Annotation 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
.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Required Element Summary
-
Optional Element Summary
-
Element Details
-
value
The prefix to use when resolving properties. The prefix should be defined in kebab case. Example: my-app.foo.- Returns:
- The prefix to use to resolve the properties
-
-
-
cliPrefix
String[] cliPrefixIf 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
- Returns:
- The CLI prefix of the configuration. If a blank string is used then no prefix is appended
- Default:
- {}
-
includes
@AliasFor(annotation=ConfigurationReader.class,member="includes") @AliasFor(annotation=BeanProperties.class,member="includes") String[] includes- Returns:
- The names of the properties to include
- Default:
- {}
-
excludes
@AliasFor(annotation=ConfigurationReader.class,member="excludes") @AliasFor(annotation=BeanProperties.class,member="excludes") String[] excludes- Returns:
- The names of the properties to exclude
- Default:
- {}
-