File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
hsweb-web-core/src/main/java/org/hsweb/web/core/authorize Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 24
24
import java .util .concurrent .ConcurrentHashMap ;
25
25
import java .util .concurrent .ConcurrentMap ;
26
26
27
- /**
28
- * Created by zhouhao on 16-4-28.
29
- */
30
27
public class AopAuthorizeValidator extends SimpleAuthorizeValidator {
31
28
32
29
private HttpSessionManager httpSessionManager ;
@@ -57,7 +54,7 @@ protected AuthorizeValidatorConfig getConfig(ProceedingJoinPoint pjp) {
57
54
return null ;
58
55
}
59
56
Set <Authorize > authorizes = new LinkedHashSet <>();
60
- if (classAuth != null ) {
57
+ if (classAuth != null && ( methodAuth == null || methodAuth . merge ()) ) {
61
58
if (classAuth .anonymous ()) return null ;
62
59
authorizes .add (classAuth );
63
60
}
Original file line number Diff line number Diff line change 56
56
57
57
/**
58
58
* 可匿名访问
59
- * @return 是否可匿名访问,匿名访问将不用登录
59
+ *
60
+ * @return 是否可匿名访问, 匿名访问将不用登录
60
61
*/
61
62
boolean anonymous () default false ;
63
+
64
+ /**
65
+ * 是否合并类上的注解
66
+ *
67
+ * @return 是否合并类上的注解
68
+ */
69
+ boolean merge () default true ;
70
+
62
71
/**
63
72
* 验证模式,在使用多个验证条件时有效
64
73
*
You can’t perform that action at this time.
0 commit comments