Commit 27ba3274 authored by hezhen's avatar hezhen

屏蔽部分配置

parent 93b71ceb
......@@ -32,7 +32,7 @@ public class ServiceAuthRestInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if (handler instanceof HandlerMethod) {
// if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
// 配置该注解,说明不进行服务拦截
IgnoreClientToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreClientToken.class);
......@@ -52,8 +52,8 @@ public class ServiceAuthRestInterceptor extends HandlerInterceptorAdapter {
}
}
throw new ClientForbiddenException("Client is Forbidden!");
} else {
return super.preHandle(request, response, handler);
}
// } else {
// return super.preHandle(request, response, handler);
// }
}
}
......@@ -31,7 +31,7 @@ public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if (handler instanceof HandlerMethod) {
// if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
// 配置该注解,说明不进行用户拦截
IgnoreUserToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreUserToken.class);
......@@ -64,9 +64,9 @@ public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
BaseContextHandler.setToken(token);
// 这里可以添加RequestType
return super.preHandle(request, response, handler);
}else {
return super.preHandle(request, response, handler);
}
// }else {
// return super.preHandle(request, response, handler);
// }
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment