Package org.jeasy.props.annotations
Annotation Type MavenProperty
-
@Retention(RUNTIME) @Target(FIELD) public @interface MavenProperty
This annotation injects a property from a maven properties file in the annotated field. By default, the properties file is located inMETA-INF/maven/groupId/artifactId/pom.properties- Author:
- lhottois (natlantisprog@gmail.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.StringsourceThe property source file containing maven properties (by default "pom.properties", as generated by maven archiver).
-
-
-
Element Detail
-
key
String key
The key in the maven properties file.- Returns:
- The key in the maven properties file
-
-
-
artifactId
String artifactId
The artifactId of jar to look for.- Returns:
- the artifactId
-
-
-
groupId
String groupId
The groupId of the jar file to look for.- Returns:
- the groupId
-
-
-
source
String source
The property source file containing maven properties (by default "pom.properties", as generated by maven archiver).- Returns:
- The property source file containing maven properties
- Default:
- "pom.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:
- ""
-
-