Class ModifableConfigurablePopulatorPostProcessor

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

    public class ModifableConfigurablePopulatorPostProcessor
    extends java.lang.Object
    implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanPostProcessor
    This is BeanPostProcessor for modifying populators in existing ModifiableConfigurablePopulaotr beans or any parent in spring declaration.

    It process all instances of ConfigurablePopulatorModification beans and applies modification stored in those beans to given objects. If for some reasons (lazyInit) ConfigurablePopulatorModification is not instanciated then this post processor will not get triggered which may lead to some nasty bugs.

    Forcing this BeanPostProcessor to load all ConfigurablePopulatorModification instances during its initialization (via dependency injection or by extracting them form ApplicationContext) will lead to change in order in which beans are intialized. Especially some beans will be instanciated before other BeanPostProcessors which may highly affect stability of the system, so its a bad idea.

    • Field Detail

      • beanFactory

        protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory
    • Constructor Detail

      • ModifableConfigurablePopulatorPostProcessor

        public ModifableConfigurablePopulatorPostProcessor()
    • Method Detail

      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Throws:
        org.springframework.beans.BeansException
      • initialize

        @PostConstruct
        public void initialize()
      • postProcessBeforeInitialization

        public java.lang.Object postProcessBeforeInitialization​(java.lang.Object bean,
                                                                java.lang.String beanName)
                                                         throws org.springframework.beans.BeansException
        Specified by:
        postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException
      • postProcessAfterInitialization

        public java.lang.Object postProcessAfterInitialization​(java.lang.Object bean,
                                                               java.lang.String beanName)
                                                        throws org.springframework.beans.BeansException
        Specified by:
        postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException