@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Documented @Indexed public @interface ConfigurationProperties
@Bean method in a @Configuration class if you want to bind and validate
some external Properties (e.g. from a .properties file).
Binding is either performed by calling setters on the annotated class or, if
@ConstructorBinding is in use, by binding to the constructor
parameters.
Note that contrary to @Value, SpEL expressions are not evaluated since property
values are externalized.
ConfigurationPropertiesScan,
ConstructorBinding,
ConfigurationPropertiesBindingPostProcessor,
EnableConfigurationProperties| 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.
|
String |
value
The prefix of the properties that are valid to bind to this object.
|
@AliasFor(value="prefix") public abstract String value
prefix(). A valid prefix is defined by one or more words separated with
dots (e.g. "acme.system.feature").@AliasFor(value="value") public abstract String prefix
value(). A valid prefix is defined by one or more words separated with
dots (e.g. "acme.system.feature").public abstract boolean ignoreInvalidFields