Commit 27ba3274 authored by hezhen's avatar hezhen

屏蔽部分配置

parent 93b71ceb
...@@ -32,7 +32,7 @@ public class ServiceAuthRestInterceptor extends HandlerInterceptorAdapter { ...@@ -32,7 +32,7 @@ public class ServiceAuthRestInterceptor extends 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 {
if (handler instanceof HandlerMethod) { // if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler; HandlerMethod handlerMethod = (HandlerMethod) handler;
// 配置该注解,说明不进行服务拦截 // 配置该注解,说明不进行服务拦截
IgnoreClientToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreClientToken.class); IgnoreClientToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreClientToken.class);
...@@ -52,8 +52,8 @@ public class ServiceAuthRestInterceptor extends HandlerInterceptorAdapter { ...@@ -52,8 +52,8 @@ public class ServiceAuthRestInterceptor extends HandlerInterceptorAdapter {
} }
} }
throw new ClientForbiddenException("Client is Forbidden!"); throw new ClientForbiddenException("Client is Forbidden!");
} else { // } else {
return super.preHandle(request, response, handler); // return super.preHandle(request, response, handler);
} // }
} }
} }
...@@ -31,7 +31,7 @@ public class UserAuthRestInterceptor extends HandlerInterceptorAdapter { ...@@ -31,7 +31,7 @@ public class UserAuthRestInterceptor extends 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 {
if (handler instanceof HandlerMethod) { // if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler; HandlerMethod handlerMethod = (HandlerMethod) handler;
// 配置该注解,说明不进行用户拦截 // 配置该注解,说明不进行用户拦截
IgnoreUserToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreUserToken.class); IgnoreUserToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreUserToken.class);
...@@ -64,9 +64,9 @@ public class UserAuthRestInterceptor extends HandlerInterceptorAdapter { ...@@ -64,9 +64,9 @@ public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
BaseContextHandler.setToken(token); BaseContextHandler.setToken(token);
// 这里可以添加RequestType // 这里可以添加RequestType
return super.preHandle(request, response, handler); return super.preHandle(request, response, handler);
}else { // }else {
return super.preHandle(request, response, handler); // return super.preHandle(request, response, handler);
} // }
} }
@Override @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