org.springframework.boot.context.properties

Class ConfigurationPropertiesBean

  • java.lang.Object
    • org.springframework.boot.context.properties.ConfigurationPropertiesBean
    • Method Detail

      • getName

        public String getName()
        Return the name of the Spring bean.
        Returns:
        the bean name
      • getInstance

        public Object getInstance()
        Return the actual Spring bean instance.
        Returns:
        the bean instance
      • getAnnotation

        public ConfigurationProperties getAnnotation()
        Return the ConfigurationProperties annotation for the bean. The annotation may be defined on the bean itself or from the factory method that create the bean (usually a @Bean method).
        Returns:
        the configuration properties annotation
      • asBindTarget

        public Bindable<?> asBindTarget()
        Return a Bindable instance suitable that can be used as a target for the Binder.
        Returns:
        a bind target for use with the Binder
      • getAll

        public static Map<String,ConfigurationPropertiesBean> getAll(org.springframework.context.ApplicationContext applicationContext)
        Return all @ConfigurationProperties beans contained in the given application context. Both directly annotated beans, as well as beans that have @ConfigurationProperties annotated factory methods are included.
        Parameters:
        applicationContext - the source application context
        Returns:
        a map of all configuration properties beans keyed by the bean name
      • get

        public static ConfigurationPropertiesBean get(org.springframework.context.ApplicationContext applicationContext,
                                                      Object bean,
                                                      String beanName)
        Return a @ConfigurationPropertiesBean instance for the given bean details or null if the bean is not a @ConfigurationProperties object. Annotations are considered both on the bean itself, as well as any factory method (for example a @Bean method).
        Parameters:
        applicationContext - the source application context
        bean - the bean to consider
        beanName - the bean name
        Returns:
        a configuration properties bean or null if the neither the bean or factory method are annotated with @ConfigurationProperties

Copyright © 2019 Pivotal Software, Inc.. All rights reserved.