批注接口 EnableConfigurationProperties


@Target(TYPE) @Retention(RUNTIME) @Documented @Import(org.springframework.boot.context.properties.EnableConfigurationPropertiesRegistrar.class) public @interface EnableConfigurationProperties
Enable support for @ConfigurationProperties annotated beans. @ConfigurationProperties beans can be registered in the standard way (for example using @Bean methods) or, for convenience, can be specified directly on this annotation.
从以下版本开始:
1.0.0
作者:
Dave Syer
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    Class<?>[]
    Convenient way to quickly register @ConfigurationProperties annotated beans with Spring.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    The bean name of the configuration properties validator.
  • 字段详细资料

    • VALIDATOR_BEAN_NAME

      static final String VALIDATOR_BEAN_NAME
      The bean name of the configuration properties validator.
      从以下版本开始:
      2.2.0
      另请参阅:
  • 元素详细资料

    • value

      Class<?>[] value
      Convenient way to quickly register @ConfigurationProperties annotated beans with Spring. Standard Spring Beans will also be scanned regardless of this value.
      返回:
      @ConfigurationProperties annotated beans to register
      默认值:
      {}