Class ImportAwareAotBeanPostProcessor

java.lang.Object
org.springframework.context.annotation.ImportAwareAotBeanPostProcessor
All Implemented Interfaces:
BeanPostProcessor

public final class ImportAwareAotBeanPostProcessor extends Object implements BeanPostProcessor
A BeanPostProcessor that honours ImportAware callback using a mapping computed at build time.
Since:
6.0
Author:
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
      Parameters:
      bean - the new bean instance
      beanName - 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: