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