Package org.jeasy.props.annotations
Annotation Type Property
-
@Retention(RUNTIME) @Target(FIELD) public @interface Property
This annotation can be declared on a field in which a property should be injected from a properties file.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringdefaultValueThe default value to set in case the key does not exist or cannot be loaded.booleanfailFastFlag to fail the configuration process if the key is absentintorderInjection order regarding other annotations.
-
-
-
Element Detail
-
source
String source
The properties file name.- Returns:
- The properties file name
-
-
-
key
String key
The key to load from the properties file.- Returns:
- The key to load from the properties file
-
-
-
defaultValue
String defaultValue
The default value to set in case the key does not exist or cannot be loaded.- Returns:
- the default value to set
- Default:
- ""
-
-