Commit e674517f by guojuxing

免登录调整

parent 64bf0767
...@@ -60,12 +60,6 @@ public class AuthInterceptor extends HandlerInterceptorAdapter { ...@@ -60,12 +60,6 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
String uri = request.getRequestURI(); String uri = request.getRequestURI();
log.info("权限拦截token url:{}", uri); log.info("权限拦截token url:{}", uri);
HandlerMethod handler = (HandlerMethod) object;
//免登录接口路由
IgnoreLogin ignoreLogin = handler.getMethodAnnotation(IgnoreLogin.class);
if (null != ignoreLogin) {
return true;
}
//操作项标志位 //操作项标志位
String isControl = request.getHeader("isControl"); String isControl = request.getHeader("isControl");
...@@ -84,6 +78,14 @@ public class AuthInterceptor extends HandlerInterceptorAdapter { ...@@ -84,6 +78,14 @@ public class AuthInterceptor extends HandlerInterceptorAdapter {
} }
request.setAttribute("user", userDetail); request.setAttribute("user", userDetail);
HandlerMethod handler = (HandlerMethod) object;
//免登录接口路由
IgnoreLogin ignoreLogin = handler.getMethodAnnotation(IgnoreLogin.class);
if (null != ignoreLogin) {
return true;
}
//不需要拦截的路径 //不需要拦截的路径
if (ignoreUriAfterLoginMap.containsKey(uri)) { if (ignoreUriAfterLoginMap.containsKey(uri)) {
return true; return true;
......
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