mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-05-22 17:07:12 +08:00
+ Authorize
This commit is contained in:
@@ -3,6 +3,7 @@ package org.hswebframework.web.authorization.basic.aop;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.hswebframework.web.AopUtils;
|
||||
import org.hswebframework.web.authorization.Authentication;
|
||||
import org.hswebframework.web.authorization.annotation.Authorize;
|
||||
import org.hswebframework.web.authorization.define.AuthorizingContext;
|
||||
import org.hswebframework.web.authorization.basic.handler.AuthorizingHandler;
|
||||
import org.hswebframework.web.authorization.define.AuthorizeDefinition;
|
||||
@@ -48,6 +49,7 @@ public class AopAuthorizingController extends StaticMethodMatcherPointcutAdvisor
|
||||
public boolean matches(Method method, Class<?> aClass) {
|
||||
//对controller进行控制
|
||||
return AopUtils.findAnnotation(aClass, Controller.class) != null
|
||||
|| AopUtils.findAnnotation(aClass, RestController.class) != null;
|
||||
|| AopUtils.findAnnotation(aClass, RestController.class) != null
|
||||
|| AopUtils.findAnnotation(aClass, method, Authorize.class) != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user