@Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) @Documented public @interface PropertyMapping
@PropertySource
. Can be used at the type level, or on individual
attributes. For example, the following annotation declaration: @Retention(RUNTIME) @PropertyMapping("my.example") public @interface Example { String name(); }When used on a test class as follows:
@Example(name="Spring") public class MyTest { }will result in a my.example.name property being added with the value "Spring".
AnnotationsPropertySource
,
TestPropertySource
Modifier and Type | Optional Element and Description |
---|---|
SkipPropertyMapping |
skip
Determines if mapping should be skipped.
|
String |
value
Defines the property mapping.
|
public abstract String value
public abstract SkipPropertyMapping skip