Class ImportAwareAotBeanPostProcessor
java.lang.Object
org.springframework.context.annotation.ImportAwareAotBeanPostProcessor
- All Implemented Interfaces:
BeanPostProcessor
,Ordered
,PriorityOrdered
public final class ImportAwareAotBeanPostProcessor
extends Object
implements BeanPostProcessor, PriorityOrdered
A
BeanPostProcessor
that honours ImportAware
callback using
a mapping computed at build time.- Since:
- 6.0
- Author:
- Stephane Nicoll
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
Get the order value of this object.postProcessBeforeInitialization
(Object bean, String beanName) Apply thisBeanPostProcessor
to the given new bean instance before any bean initialization callbacks (like InitializingBean'safterPropertiesSet
or a custom init-method).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessAfterInitialization
-
Constructor Details
-
ImportAwareAotBeanPostProcessor
-
-
Method Details
-
postProcessBeforeInitialization
Description copied from interface:BeanPostProcessor
Apply thisBeanPostProcessor
to the given new bean instance before any bean initialization callbacks (like InitializingBean'safterPropertiesSet
or a custom init-method). The bean will already be populated with property values. The returned bean instance may be a wrapper around the original.The default implementation returns the given
bean
as-is.- Specified by:
postProcessBeforeInitialization
in interfaceBeanPostProcessor
- Parameters:
bean
- the new bean instancebeanName
- the name of the bean- Returns:
- the bean instance to use, either the original or a wrapped one;
if
null
, no subsequent BeanPostProcessors will be invoked - See Also:
-
getOrder
public int getOrder()Description copied from interface:Ordered
Get the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startup
values).Same order values will result in arbitrary sort positions for the affected objects.
-