public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorAutoProxyCreator
AspectJAwareAdvisorAutoProxyCreator subclass that processes all AspectJ
annotation aspects in the current application context, as well as Spring Advisors.
Any AspectJ annotated classes will automatically be recognized, and their advice applied if Spring AOP's proxy-based model is capable of applying it. This covers method execution joinpoints.
If the <aop:include> element is used, only @AspectJ beans with names matched by an include pattern will be considered as defining aspects to use for Spring auto-proxying.
Processing of Spring Advisors follows the rules established in
AbstractAdvisorAutoProxyCreator.
AspectJAdvisorFactory,
序列化表格DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS| 构造器和说明 |
|---|
AnnotationAwareAspectJAutoProxyCreator() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<Advisor> |
findCandidateAdvisors()
Find all candidate Advisors to use in auto-proxying.
|
protected void |
initBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected boolean |
isEligibleAspectBean(String beanName)
Check whether the given aspect bean is eligible for auto-proxying.
|
protected boolean |
isInfrastructureClass(Class<?> beanClass)
我aop功能中有进行了重写了父类的判断(事务没有重写)
|
void |
setAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory) |
void |
setIncludePatterns(List<String> patterns)
Set a list of regex patterns, matching eligible @AspectJ bean names.
|
extendAdvisors, shouldSkip, sortAdvisorsadvisorsPreFiltered, findAdvisorsThatCanApply, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, isEligibleAdvisorBean, setBeanFactorybuildAdvisors, createProxy, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, wrapIfNecessaryevaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoadercopyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toStringpublic void setIncludePatterns(List<String> patterns)
Default is to consider all @AspectJ beans as eligible.
public void setAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory)
protected void initBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
protected List<Advisor> findCandidateAdvisors()
AbstractAdvisorAutoProxyCreatorfindCandidateAdvisors 在类中 AbstractAdvisorAutoProxyCreatorprotected boolean isInfrastructureClass(Class<?> beanClass)
isInfrastructureClass 在类中 AbstractAutoProxyCreatorbeanClass - the class of the beanAdvice,
Advisor,
AopInfrastructureBean,
AbstractAutoProxyCreator.shouldSkip(java.lang.Class<?>, java.lang.String)protected boolean isEligibleAspectBean(String beanName)
If no <aop:include> elements were used then "includePatterns" will be
null and all beans are included. If "includePatterns" is non-null,
then one of the patterns must match.