BeanPostProcessor implementation that wraps a group of beans with AOP proxies
that delegate to the given interceptors before invoking the bean itself.
This class distinguishes between "common" interceptors: shared for all proxies it
creates, and "specific" interceptors: unique per bean instance. There need not
be any common interceptors. If there are, they are set using the interceptorNames
property. As with ProxyFactoryBean, interceptors names in the current factory
are used rather than bean references to allow correct handling of prototype
advisors and interceptors: for example, to support stateful mixins.
Any advice type is supported for "interceptorNames" entries.
Such auto-proxying is particularly useful if there's a large number of beans that need
to be wrapped with similar proxies, i.e. delegating to the same interceptors.
Instead of x repetitive proxy definitions for x target beans, you can register
one single such post processor with the bean factory to achieve the same effect.
Subclasses can apply any strategy to decide if a bean is to be proxied,
e.g. by type, by name, by definition details, etc. They can also return
additional interceptors that should just be applied to the specific bean
instance. The default concrete implementation is BeanNameAutoProxyCreator,
identifying the beans to be proxied via a list of bean names.
Any number of TargetSourceCreator implementations can be used with any subclass,
to create a custom target source - for example, to pool prototype objects.
Autoproxying will occur even if there is no advice if a TargetSourceCreator specifies
a custom TargetSource. If there are no TargetSourceCreators set, or if none matches,
a SingletonTargetSource will be used by default to wrap the bean to be autoproxied.
This class distinguishes between "common" interceptors: shared for all proxies it creates, and "specific" interceptors: unique per bean instance. There need not be any common interceptors. If there are, they are set using the interceptorNames property. As with ProxyFactoryBean, interceptors names in the current factory are used rather than bean references to allow correct handling of prototype advisors and interceptors: for example, to support stateful mixins. Any advice type is supported for "interceptorNames" entries.
Such auto-proxying is particularly useful if there's a large number of beans that need to be wrapped with similar proxies, i.e. delegating to the same interceptors. Instead of x repetitive proxy definitions for x target beans, you can register one single such post processor with the bean factory to achieve the same effect.
Subclasses can apply any strategy to decide if a bean is to be proxied, e.g. by type, by name, by definition details, etc. They can also return additional interceptors that should just be applied to the specific bean instance. The default concrete implementation is BeanNameAutoProxyCreator, identifying the beans to be proxied via a list of bean names.
Any number of TargetSourceCreator implementations can be used with any subclass, to create a custom target source - for example, to pool prototype objects. Autoproxying will occur even if there is no advice if a TargetSourceCreator specifies a custom TargetSource. If there are no TargetSourceCreators set, or if none matches, a SingletonTargetSource will be used by default to wrap the bean to be autoproxied.