java.lang.Object | |||
↳ | org.springframework.aop.framework.ProxyConfig | ||
↳ | org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator | ||
↳ | org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator |
Auto proxy creator that identifies beans to proxy via a list of names. Checks for direct, "xxx*", and "*xxx" matches.
For configuration details, see the javadoc of the parent class AbstractAutoProxyCreator. Typically, you will specify a list of interceptor names to apply to all identified beans, via the "interceptorNames" property.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.springframework.core.Ordered
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the names of the beans that should automatically get wrapped with proxies.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Identify as bean to proxy if the bean name is in the configured list of names.
| |||||||||||
Return if the given bean name matches the mapped name.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
| |||||||||||
From class
org.springframework.aop.framework.ProxyConfig
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.BeanClassLoaderAware
| |||||||||||
From interface
org.springframework.beans.factory.BeanFactoryAware
| |||||||||||
From interface
org.springframework.beans.factory.config.BeanPostProcessor
| |||||||||||
From interface
org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
| |||||||||||
From interface
org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor
| |||||||||||
From interface
org.springframework.core.Ordered
|
Set the names of the beans that should automatically get wrapped with proxies. A name can specify a prefix to match by ending with "*", e.g. "myBean,tx*" will match the bean named "myBean" and all beans whose name start with "tx".
NOTE: In case of a FactoryBean, only the objects created by the FactoryBean will get proxied. This default behavior applies as of Spring 2.0. If you intend to proxy a FactoryBean instance itself (a rare use case, but Spring 1.2's default behavior), specify the bean name of the FactoryBean including the factory-bean prefix "&": e.g. "&myFactoryBean".
Identify as bean to proxy if the bean name is in the configured list of names.
beanClass | the class of the bean to advise |
---|---|
beanName | the name of the bean |
targetSource | the TargetSource returned by the
getCustomTargetSource(Class>, String) method: may be ignored.
Will be null if no custom target source is in use. |
null
if no proxy at all, not even with the common interceptors.
See constants DO_NOT_PROXY and PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS.Return if the given bean name matches the mapped name.
The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.
beanName | the bean name to check |
---|---|
mappedName | the name in the configured list of names |