Class 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.
Stephane Nicoll
  • Constructor Details

    • ImportAwareAotBeanPostProcessor

      public ImportAwareAotBeanPostProcessor(Map<String,String> importsMapping)
  • Method Details

    • postProcessBeforeInitialization

      public Object postProcessBeforeInitialization(Object bean, String beanName)
      Description copied from interface: BeanPostProcessor
      Apply this BeanPostProcessor to the given new bean instance before any bean initialization callbacks (like InitializingBean's afterPropertiesSet 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 interface BeanPostProcessor
      bean - the new bean instance
      beanName - the name of the bean
      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.

      Specified by:
      getOrder in interface Ordered
      the order value
      See Also: