|
@@ -1,13 +1,12 @@
|
1
|
1
|
package com.xxl.job.admin.controller.interceptor;
|
2
|
2
|
|
3
|
|
-import javax.servlet.http.HttpServletRequest;
|
4
|
|
-import javax.servlet.http.HttpServletResponse;
|
5
|
|
-
|
|
3
|
+import com.xxl.job.admin.controller.annotation.PermessionLimit;
|
|
4
|
+import com.xxl.job.admin.core.util.CookieUtil;
|
6
|
5
|
import org.springframework.web.method.HandlerMethod;
|
7
|
6
|
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
8
|
7
|
|
9
|
|
-import com.xxl.job.admin.controller.annotation.PermessionLimit;
|
10
|
|
-import com.xxl.job.admin.core.util.CookieUtil;
|
|
8
|
+import javax.servlet.http.HttpServletRequest;
|
|
9
|
+import javax.servlet.http.HttpServletResponse;
|
11
|
10
|
|
12
|
11
|
/**
|
13
|
12
|
* 权限拦截, 简易版
|
|
@@ -44,7 +43,7 @@ public class PermissionInterceptor extends HandlerInterceptorAdapter {
|
44
|
43
|
HandlerMethod method = (HandlerMethod)handler;
|
45
|
44
|
PermessionLimit permission = method.getMethodAnnotation(PermessionLimit.class);
|
46
|
45
|
if (permission == null || permission.limit()) {
|
47
|
|
- throw new Exception("登陆实效");
|
|
46
|
+ throw new Exception("登陆失效");
|
48
|
47
|
}
|
49
|
48
|
}
|
50
|
49
|
|