类 AspectJAwareAdvisorAutoProxyCreator
- java.lang.Object
- org.springframework.aop.framework.ProxyConfig
- org.springframework.aop.framework.ProxyProcessorSupport
- org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
- org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
- org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator
- 所有已实现的接口:
Serializable
,AopInfrastructureBean
,Aware
,BeanClassLoaderAware
,BeanFactoryAware
,BeanPostProcessor
,InstantiationAwareBeanPostProcessor
,SmartInstantiationAwareBeanPostProcessor
,Ordered
public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator
AbstractAdvisorAutoProxyCreator
subclass that exposes AspectJ's invocation context and understands AspectJ's rules for advice precedence when multiple pieces of advice come from the same aspect.- 从以下版本开始:
- 2.0
- 作者:
- Adrian Colyer, Juergen Hoeller, Ramnivas Laddad
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 AspectJAwareAdvisorAutoProxyCreator()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
extendAdvisors(List<Advisor> candidateAdvisors)
Adds anExposeInvocationInterceptor
to the beginning of the advice chain.protected boolean
shouldSkip(Class<?> beanClass, String beanName)
Subclasses should override this method to returntrue
if the given bean should not be considered for auto-proxying by this post-processor.protected List<Advisor>
sortAdvisors(List<Advisor> advisors)
Sort the rest by AspectJ precedence.从类继承的方法 org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
advisorsPreFiltered, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, isEligibleAdvisorBean, setBeanFactory
从类继承的方法 org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
buildAdvisors, createProxy, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, wrapIfNecessary
从类继承的方法 org.springframework.aop.framework.ProxyProcessorSupport
evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoader
从类继承的方法 org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString
构造器详细资料
AspectJAwareAdvisorAutoProxyCreator
public AspectJAwareAdvisorAutoProxyCreator()
方法详细资料
sortAdvisors
protected List<Advisor> sortAdvisors(List<Advisor> advisors)
Sort the rest by AspectJ precedence. If two pieces of advice have come from the same aspect they will have the same order. Advice from the same aspect is then further ordered according to the following rules:- if either of the pair is after advice, then the advice declared last gets highest precedence (runs last)
- otherwise the advice declared first gets highest precedence (runs first)
Important: Advisors are sorted in precedence order, from highest precedence to lowest. "On the way in" to a join point, the highest precedence advisor should run first. "On the way out" of a join point, the highest precedence advisor should run last.
- 覆盖:
sortAdvisors
在类中AbstractAdvisorAutoProxyCreator
- 参数:
advisors
- the source List of Advisors- 返回:
- the sorted List of Advisors
- 另请参阅:
Ordered
,Order
,AnnotationAwareOrderComparator
extendAdvisors
protected void extendAdvisors(List<Advisor> candidateAdvisors)
Adds anExposeInvocationInterceptor
to the beginning of the advice chain. These additional advices are needed when using AspectJ expression pointcuts and when using AspectJ-style advice.- 覆盖:
extendAdvisors
在类中AbstractAdvisorAutoProxyCreator
- 参数:
candidateAdvisors
- the Advisors that have already been identified as applying to a given bean
shouldSkip
protected boolean shouldSkip(Class<?> beanClass, String beanName)
从类复制的说明:AbstractAutoProxyCreator
Subclasses should override this method to returntrue
if the given bean should not be considered for auto-proxying by this post-processor.Sometimes we need to be able to avoid this happening if it will lead to a circular reference. This implementation returns
false
.- 覆盖:
shouldSkip
在类中AbstractAutoProxyCreator
- 参数:
beanClass
- the class of the beanbeanName
- the name of the bean- 返回:
- whether to skip the given bean