Class ConfigurationBeanBindingPostProcessor

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

    public class ConfigurationBeanBindingPostProcessor
    extends java.lang.Object
    implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.PriorityOrdered
    A BeanPostProcessor implementation that binds configuration beans with their corresponding properties.

    This class processes beans annotated or registered as configuration beans, applying the relevant property values during initialization. It also supports customization through a list of ConfigurationBeanCustomizer instances, which can modify the configuration beans after binding.

    Example Usage

    Basic Binding

    {@code
    Since:
    1.0.0
    Author:
    Mercy
    • Constructor Detail

      • ConfigurationBeanBindingPostProcessor

        public ConfigurationBeanBindingPostProcessor()
    • Method Detail

      • 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
      • setOrder

        public void setOrder​(int order)
        Set the order for current instance
        Parameters:
        order - the order
      • setConfigurationBeanBinder

        public void setConfigurationBeanBinder​(ConfigurationBeanBinder configurationBeanBinder)
      • setConfigurationBeanCustomizers

        public void setConfigurationBeanCustomizers​(java.util.Collection<ConfigurationBeanCustomizer> configurationBeanCustomizers)
      • 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
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered