+ Authorize

This commit is contained in:
zhou-hao
2017-11-24 18:04:05 +08:00
parent 2ff65d9796
commit 587cc57a33

View File

@@ -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;
}
}