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.
Author
Juergen Hoeller
Since
4.2.3
See Also
AutoProxyUtils#shouldProxyTargetClassAutoProxyUtils#determineTargetClass
AbstractBeanFactoryAwareAdvisingPostProcessor()
Extension of AbstractAutoProxyCreator which implements BeanFactoryAware, adds exposure of the original target class for each proxied bean ( |
open fun setBeanFactory(beanFactory: BeanFactory): Unit |
open fun postProcessAfterInitialization(bean: Any, beanName: String): Any |
|
open fun postProcessBeforeInitialization(bean: Any, beanName: String): Any |
|
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. |
open class MethodValidationPostProcessor : AbstractBeanFactoryAwareAdvisingPostProcessor, InitializingBean
A convenient BeanPostProcessor implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods. Applicable methods have JSR-303 constraint annotations on their parameters and/or on their return value (in the latter case specified at the method level, typically as inline annotation), e.g.:
Target classes with such annotated methods need to be annotated with Spring's Validated annotation at the type level, for their methods to be searched for inline constraint annotations. Validation groups can be specified through As of Spring 5.0, this functionality requires a Bean Validation 1.1 provider. |
|
open class PersistenceExceptionTranslationPostProcessor : AbstractBeanFactoryAwareAdvisingPostProcessor
Bean post-processor that automatically applies persistence exception translation to any bean marked with Spring's @org.springframework.stereotype.Repository annotation, adding a corresponding PersistenceExceptionTranslationAdvisor to the exposed proxy (either an existing AOP proxy or a newly generated proxy that implements all of the target's interfaces). Translates native resource exceptions to Spring's org.springframework.dao.DataAccessException hierarchy. Autodetects beans that implement the org.springframework.dao.support.PersistenceExceptionTranslator interface, which are subsequently asked to translate candidate exceptions. All of Spring's applicable resource factories (e.g. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean) implement the |