update > optimize sign validate code & annotation

master
lihengming 7 years ago
parent ac667efa44
commit 8a81db5488
  1. 2
      src/main/java/com/company/project/configurer/WebMvcConfigurer.java

@ -102,7 +102,7 @@ public class WebMvcConfigurer extends WebMvcConfigurerAdapter {
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
//接口签名认证拦截器,该签名认证比较简单,实际项目中可以使用Json Web Token或其他更好的方式替代。 //接口签名认证拦截器,该签名认证比较简单,实际项目中可以使用Json Web Token或其他更好的方式替代。
if (!StringUtils.contains(env, "dev")) { //开发环境忽略签名认证 if (!"dev".equals(env)) { //开发环境忽略签名认证
registry.addInterceptor(new HandlerInterceptorAdapter() { registry.addInterceptor(new HandlerInterceptorAdapter() {
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {

Loading…
Cancel
Save