Package org.jeasy.props.annotations
Annotation Type DBProperty
-
@Retention(RUNTIME) @Target(FIELD) public @interface DBProperty
This annotation can be declared on a field in which a property should be injected from a database.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description StringconfigurationThe configuration file containing database connection properties.StringkeyThe key to load from the table specified in the configuration properties.
-
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
-
configuration
String configuration
The configuration file containing database connection properties.- Returns:
- The configuration file containing database connection properties
-
-
-
key
String key
The key to load from the table specified in the configuration properties.- Returns:
- The key to load from the table specified in the configuration properties
-
-
-
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:
- ""
-
-