public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements org.springframework.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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SEPARATOR
Separator between prefix and remainder of bean name
|
DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS| Constructor and Description |
|---|
DefaultAdvisorAutoProxyCreator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAdvisorBeanNamePrefix()
Return the prefix for bean names that will cause them to be included
for auto-proxying by this object.
|
protected boolean |
isEligibleAdvisorBean(java.lang.String beanName)
Consider
Advisor beans with the specified prefix as eligible, if activated. |
boolean |
isUsePrefix()
Return whether to only include advisors with a certain prefix in the bean name.
|
void |
setAdvisorBeanNamePrefix(java.lang.String advisorBeanNamePrefix)
Set the prefix for bean names that will cause them to be included for
auto-proxying by this object.
|
void |
setBeanName(java.lang.String name) |
void |
setUsePrefix(boolean usePrefix)
Set whether to only include advisors with a certain prefix in the bean name.
|
advisorsPreFiltered, extendAdvisors, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, setBeanFactory, sortAdvisorsbuildAdvisors, createProxy, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, shouldSkip, wrapIfNecessaryevaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoadercopyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toStringpublic static final java.lang.String SEPARATOR
public void setUsePrefix(boolean usePrefix)
Default is false, including all beans of type Advisor.
public boolean isUsePrefix()
public void setAdvisorBeanNamePrefix(java.lang.String advisorBeanNamePrefix)
advisorBeanNamePrefix - the exclusion prefixpublic java.lang.String getAdvisorBeanNamePrefix()
public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwareprotected boolean isEligibleAdvisorBean(java.lang.String beanName)
Advisor beans with the specified prefix as eligible, if activated.isEligibleAdvisorBean in class AbstractAdvisorAutoProxyCreatorbeanName - the name of the Advisor beansetUsePrefix(boolean),
setAdvisorBeanNamePrefix(java.lang.String)