spring-framework / org.springframework.aop.framework / AbstractAdvisingBeanPostProcessor

AbstractAdvisingBeanPostProcessor

abstract class AbstractAdvisingBeanPostProcessor : ProxyProcessorSupport, BeanPostProcessor

Base class for BeanPostProcessor implementations that apply a Spring AOP Advisor to specific beans.

Author
Juergen Hoeller

Since
3.2

Constructors

<init>

AbstractAdvisingBeanPostProcessor()

Base class for BeanPostProcessor implementations that apply a Spring AOP Advisor to specific beans.

Functions

postProcessAfterInitialization

open fun postProcessAfterInitialization(bean: Any, beanName: String): Any

postProcessBeforeInitialization

open fun postProcessBeforeInitialization(bean: Any, beanName: String): Any

setBeforeExistingAdvisors

open fun setBeforeExistingAdvisors(beforeExistingAdvisors: Boolean): Unit

Set whether this post-processor's advisor is supposed to apply before existing advisors when encountering a pre-advised object.

Default is "false", applying the advisor after existing advisors, i.e. as close as possible to the target method. Switch this to "true" in order for this post-processor's advisor to wrap existing advisors as well.

Note: Check the concrete post-processor's javadoc whether it possibly changes this flag by default, depending on the nature of its advisor.

Inheritors

AbstractBeanFactoryAwareAdvisingPostProcessor

abstract class AbstractBeanFactoryAwareAdvisingPostProcessor : AbstractAdvisingBeanPostProcessor, BeanFactoryAware

Extension of AbstractAutoProxyCreator which implements BeanFactoryAware, adds exposure of the original target class for each proxied bean (AutoProxyUtils#ORIGINAL_TARGET_CLASS_ATTRIBUTE), and participates in an externally enforced target-class mode for any given bean (AutoProxyUtils#PRESERVE_TARGET_CLASS_ATTRIBUTE). This post-processor is therefore aligned with AbstractAutoProxyCreator.