@RetentionSE(valueSE=RUNTIMESE) @TargetSE(valueSE={TYPESE,METHODSE}) @DocumentedSE public @interface PropertyMapping
PropertySource にマッピングする必要があることを示します。型レベルで、または個々の属性で使用できます。例: 次のアノテーション宣言:
@Retention(RUNTIME)
@PropertyMapping("my.example")
public @interface Example {
String name();
}
次のようにテストクラスで使用する場合:
@Example(name="Spring")
public class MyTest {
}
値 "Spring" で my.example.name プロパティが追加されます。AnnotationsPropertySource, TestPropertySource| 修飾子と型 | オプションの要素と説明 |
|---|---|
SkipPropertyMapping | skip マッピングをスキップするかどうかを決定します。 |
StringSE | value プロパティマッピングを定義します。 |
public abstract StringSE value
public abstract SkipPropertyMapping skip
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.