类 DefaultAdvisorAutoProxyCreator
java.lang.Object
infra.aop.framework.ProxyConfig
infra.aop.framework.ProxyProcessorSupport
infra.aop.framework.autoproxy.AbstractAutoProxyCreator
infra.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
infra.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
- 所有已实现的接口:
AopInfrastructureBean,ProxyCreator,infra.beans.factory.Aware,infra.beans.factory.BeanClassLoaderAware,infra.beans.factory.BeanFactoryAware,infra.beans.factory.BeanNameAware,infra.beans.factory.config.BeanPostProcessor,infra.beans.factory.config.InstantiationAwareBeanPostProcessor,infra.beans.factory.config.SmartInstantiationAwareBeanPostProcessor,infra.beans.factory.InitializationBeanPostProcessor,infra.core.Ordered,Serializable
public class DefaultAdvisorAutoProxyCreator
extends AbstractAdvisorAutoProxyCreator
implements infra.beans.factory.BeanNameAware
BeanPostProcessor implementation that creates AOP proxies based on all
candidate Advisors in the current BeanFactory. This class is
completely generic; it contains no special code to handle any particular aspects,
such as pooling aspects.
It's possible to filter out advisors - for example, to use multiple post processors
of this type in the same factory - by setting the usePrefix property to true,
in which case only advisors beginning with the DefaultAdvisorAutoProxyCreator's bean
name followed by a dot (like "aapc.") will be used. This default prefix can be changed
from the bean name by setting the advisorBeanNamePrefix property.
The separator (.) will also be used in this case.
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Rob Harrop
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private Stringstatic final StringSeparator between prefix and remainder of bean name.private boolean从类继承的字段 infra.aop.framework.autoproxy.AbstractAutoProxyCreator
DO_NOT_PROXY, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS从接口继承的字段 infra.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Return the prefix for bean names that will cause them to be included for auto-proxying by this object.protected booleanisEligibleAdvisorBean(String beanName) ConsiderAdvisorbeans with the specified prefix as eligible, if activated.booleanReturn whether to only include advisors with a certain prefix in the bean name.voidsetAdvisorBeanNamePrefix(String advisorBeanNamePrefix) Set the prefix for bean names that will cause them to be included for auto-proxying by this object.voidsetBeanName(String name) voidsetUsePrefix(boolean usePrefix) Set whether to only include advisors with a certain prefix in the bean name.从类继承的方法 infra.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
advisorsPreFiltered, extendAdvisors, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, setBeanFactory, sortAdvisors从类继承的方法 infra.aop.framework.autoproxy.AbstractAutoProxyCreator
buildAdvisors, createProxy, customizeProxyFactory, determineBeanType, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, getTargetSource, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessBeforeInstantiation, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, shouldSkip, wrapIfNecessary从类继承的方法 infra.aop.framework.ProxyProcessorSupport
evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoader从类继承的方法 infra.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 infra.beans.factory.InitializationBeanPostProcessor
postProcessBeforeInitialization从接口继承的方法 infra.beans.factory.config.InstantiationAwareBeanPostProcessor
postProcessAfterInstantiation
-
字段详细资料
-
SEPARATOR
Separator between prefix and remainder of bean name.- 另请参阅:
-
usePrefix
private boolean usePrefix -
advisorBeanNamePrefix
-
-
构造器详细资料
-
DefaultAdvisorAutoProxyCreator
public DefaultAdvisorAutoProxyCreator()
-
-
方法详细资料
-
setUsePrefix
public void setUsePrefix(boolean usePrefix) Set whether to only include advisors with a certain prefix in the bean name.Default is
false, including all beans of typeAdvisor. -
isUsePrefix
public boolean isUsePrefix()Return whether to only include advisors with a certain prefix in the bean name. -
setAdvisorBeanNamePrefix
Set the prefix for bean names that will cause them to be included for auto-proxying by this object. This prefix should be set to avoid circular references. Default value is the bean name of this object + a dot.- 参数:
advisorBeanNamePrefix- the exclusion prefix
-
getAdvisorBeanNamePrefix
Return the prefix for bean names that will cause them to be included for auto-proxying by this object. -
setBeanName
- 指定者:
setBeanName在接口中infra.beans.factory.BeanNameAware
-
isEligibleAdvisorBean
ConsiderAdvisorbeans with the specified prefix as eligible, if activated.- 覆盖:
isEligibleAdvisorBean在类中AbstractAdvisorAutoProxyCreator- 参数:
beanName- the name of the Advisor bean- 返回:
- whether the bean is eligible
- 另请参阅:
-