Annotation Interface ConfigValue
Annotation to mark a field as a configuration value.
This annotation specifies which configuration key should be used
to populate the annotated field.
- Since:
- 1.0.0
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe default value to use if the configuration key is not found.boolean
Whether the configuration value is required.
-
Element Details
-
key
String keyThe configuration key path.- Returns:
- The configuration key path
-
required
boolean requiredWhether the configuration value is required. If true and the value is not found in the configuration, an exception will be thrown.- Returns:
- True if the value is required, false otherwise
- Default:
true
-
defaultValue
String defaultValueThe default value to use if the configuration key is not found. This is only used if required is set to false.- Returns:
- The default value as a string
- Default:
""
-