Class ConfiguringBeanPostProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanPostProcessor

    public class ConfiguringBeanPostProcessor
    extends Object
    implements org.springframework.beans.factory.config.BeanPostProcessor
    Bean post processor, that configures beans using a SettingsService bean. Configuration takes place after all dependencies are injected, but before any initialization methods are called. Note that all beans that are required to create the SettingsService bean can not be processed.
    Since:
    1.0.0
    See Also:
    Configurable, Setting
    • Constructor Detail

      • ConfiguringBeanPostProcessor

        public ConfiguringBeanPostProcessor()
    • Method Detail

      • setSettingsService

        @Inject
        public void setSettingsService​(SettingsService settingsService)
        Sets the SettingsManager used to configure the beans.
        Parameters:
        settingsService - the settings service
      • postProcessBeforeInitialization

        public Object postProcessBeforeInitialization​(Object bean,
                                                      String beanName)
        Configures the bean using the settings service.
        Specified by:
        postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Parameters:
        bean - the bean instance
        beanName - the bean name
        Returns:
        the bean
        Throws:
        org.springframework.beans.factory.BeanInitializationException - if the configuration fails
      • postProcessAfterInitialization

        public Object postProcessAfterInitialization​(Object bean,
                                                     String beanName)
        Noop implementation, will just return bean.
        Specified by:
        postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Parameters:
        bean - the bean instance
        beanName - the bean name
        Returns:
        bean