@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @EnableConfigurationProperties @ConfigurationProperties @Repeatable(value=ImportAsConfigurationPropertiesBeans.class) @Import(value=org.springframework.boot.context.properties.ImportAsConfigurationPropertiesBeanRegistrar.class) public @interface ImportAsConfigurationPropertiesBean
@ConfigurationProperties beans. Can
be used to import @ConfigurationProperties annotated
types or third-party classes as configuration property beans.
Classes imported via this annotation that have a default constructor will use
setter binding, those with a non-default constructor will use
@ConstructorBinding. If you are looking to inject beans into
a constructor, you should use a regular @Configuration class
@Bean method instead.
The @ConfigurationProperties alias attributes defined on this class will only
be used if the imported class is not itself annotated
with@ConfigurationProperties.
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
ignoreInvalidFields
Flag to indicate that when binding to this object invalid fields should be ignored.
|
boolean |
ignoreUnknownFields
Flag to indicate that when binding to this object unknown fields should be ignored.
|
String |
prefix
The prefix of the properties that are valid to bind to this object.
|
Class<?>[] |
type
One or more types that should be imported as a bean.
|
Class<?>[] |
value
One or more types that should be imported as a bean.
|
@AliasFor(annotation=ConfigurationProperties.class) public abstract String prefix
"acme.system.feature").ConfigurationProperties.prefix()@AliasFor(annotation=ConfigurationProperties.class) public abstract boolean ignoreInvalidFields
ConfigurationProperties.ignoreInvalidFields()@AliasFor(annotation=ConfigurationProperties.class) public abstract boolean ignoreUnknownFields
ConfigurationProperties.ignoreUnknownFields()