public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware
MethodSecurityMetadataSource, used to exclude a
MethodSecurityInterceptorfrom public (non-secure) methods.
Because the AOP framework caches advice calculations, this is normally faster than just letting the
MethodSecurityInterceptor run and find out itself that it has no work to do.
This class also allows the use of Spring's
DefaultAdvisorAutoProxyCreator, which makes
configuration easier than setup a
ProxyFactoryBean for each object requiring security. Note that
autoproxying is not supported for BeanFactory implementations, as post-processing is automatic only for application
Based on Spring's TransactionAttributeSourceAdvisor.
|Constructor and Description|
Alternative constructor for situations where we want the advisor decoupled from the advice.
|Modifier and Type||Method and Description|
equals, getOrder, hashCode, isPerInstance, setOrder
public MethodSecurityMetadataSourceAdvisor(String adviceBeanName, MethodSecurityMetadataSource attributeSource, String attributeSourceBeanName)
adviceBeanName- name of the MethodSecurityInterceptor bean
attributeSource- the SecurityMetadataSource (should be the same as the one used on the interceptor)
attributeSourceBeanName- the bean name of the attributeSource (required for serialization)
public org.aopalliance.aop.Advice getAdvice()