public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements org.springframework.beans.factory.BeanNameAware
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 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 |
---|---|
String |
getAdvisorBeanNamePrefix()
Return the prefix for bean names that will cause them to be included
for auto-proxying by this object.
|
protected boolean |
isEligibleAdvisorBean(String beanName)
Consider Advisor beans with the specified prefix as eligible, if activated.
|
boolean |
isUsePrefix()
Return whether to exclude advisors with a certain prefix
in the bean name.
|
void |
setAdvisorBeanNamePrefix(String advisorBeanNamePrefix)
Set the prefix for bean names that will cause them to be included for
auto-proxying by this object.
|
void |
setBeanName(String name) |
void |
setUsePrefix(boolean usePrefix)
Set whether to exclude advisors with a certain prefix
in the bean name.
|
advisorsPreFiltered, extendAdvisors, findAdvisorsThatCanApply, findCandidateAdvisors, findEligibleAdvisors, getAdvicesAndAdvisorsForBean, initBeanFactory, setBeanFactory, sortAdvisors
buildAdvisors, createProxy, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, shouldSkip, wrapIfNecessary
evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoader
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString
public static final String SEPARATOR
public void setUsePrefix(boolean usePrefix)
public boolean isUsePrefix()
public void setAdvisorBeanNamePrefix(String advisorBeanNamePrefix)
advisorBeanNamePrefix
- the exclusion prefixpublic String getAdvisorBeanNamePrefix()
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
protected boolean isEligibleAdvisorBean(String beanName)
isEligibleAdvisorBean
in class AbstractAdvisorAutoProxyCreator
beanName
- the name of the Advisor beansetUsePrefix(boolean)
,
setAdvisorBeanNamePrefix(java.lang.String)