@Singleton @Documented @Retention(value=RUNTIME) @Target(value={TYPE,ANNOTATION_TYPE,METHOD,CONSTRUCTOR}) @ConfigurationReader public @interface ConfigurationProperties
Defines a singleton bean whose property values are resolved from a PropertyResolver
.
The PropertyResolver
is typically the Micronaut Environment
.
The value()
of the annotation is used to indicate the prefix where the configuration properties are located.
The class can define properties or fields which will have the configuration properties to them at runtime.
Complex nested properties are supported via classes that are public static inner classes and are also annotated
with ConfigurationProperties
.
@AliasFor(annotation=ConfigurationReader.class, member="value") public abstract String value
public abstract String[] cliPrefix
If the properties of this configuration can also be resolved from the CLI a prefix can be specified.
For example given a prefix value {code server-} and a property called {code port}, Micronaut will attempt to resolve the value of --server-port when specified on the command line
@AliasFor(annotation=ConfigurationReader.class, member="includes") public abstract String[] includes
@AliasFor(annotation=ConfigurationReader.class, member="excludes") public abstract String[] excludes