- Enclosing class:
Configuration
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueConfiguration key (from the config root) or configuration expression to find the value.Default configuration key is
<class_name>.<field_name>for field injection (if supported), and<className>.<constructor_param_name>for constructor injection. The<class_name>is the fully qualified class name of the type that uses this annotation.In addition to plain keys such as
app.greeting, this annotation supports the standard configuration-expression syntax${key:default}. Expressions may be the whole value, such as${app.greeting:Hello}, or part of a composite string, such asHello ${app.name:World}.Note that parameter names are not retained at runtime, so the parameter name when not using build time processing would be generated by the JVM.
If a whole expression does not resolve and does not define an inline default, one of the
Defaultannotations can still be used as a fallback.- Returns:
- configuration key or expression
- Default:
""
-