org.springframework.boot.context.properties

Class ConfigurationPropertiesBindingPostProcessor

  • java.lang.Object
    • org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor
  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered


    public class ConfigurationPropertiesBindingPostProcessor
    extends java.lang.Object
    implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.core.PriorityOrdered, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
    BeanPostProcessor to bind PropertySources to beans annotated with @ConfigurationProperties.
    Since:
    1.0.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String BEAN_NAME
      The bean name that this post-processor is registered with.
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Field Detail

      • BEAN_NAME

        public static final java.lang.String BEAN_NAME
        The bean name that this post-processor is registered with.
    • Constructor Detail

      • ConfigurationPropertiesBindingPostProcessor

        public ConfigurationPropertiesBindingPostProcessor()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
      • 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
      • register

        public static void register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
        Register a ConfigurationPropertiesBindingPostProcessor bean if one is not already registered.
        Parameters:
        registry - the bean definition registry
        Since:
        2.2.0