アノテーションインターフェース JacksonComponent
@TargetSE(TYPESE)
@RetentionSE(RUNTIMESE)
@DocumentedSE
@Component
public @interface JacksonComponent
JacksonComponentModule が使用されている場合に ValueSerializer、ValueDeserializer、KeyDeserializer の実装を Jackson に登録する @Component です。実装を直接アノテーション付けしたり、内部クラスとして含むクラスにアノテーションを付けたりするために使用できます。例:
@JacksonComponent
public class CustomerJacksonComponent {
public static class Serializer extends ValueSerializer<Customer> {
// ...
}
public static class Deserializer extends ValueDeserializer<Customer> {
// ...
}
}
- 導入:
- 4.0.0
- 作成者:
- Phillip Webb, Paul Aly
- 関連事項:
ネストされたクラスの概要
ネストされたクラスオプション要素の概要
オプション要素
要素の詳細
value
この値は、自動検出されたコンポーネントの場合に、Spring Bean に変換される論理コンポーネント名の提案を示す場合があります。- 戻り値:
- コンポーネント名
- デフォルト:
""
type
ClassSE<?>[] type提供されるシリアライザ / デシリアライザによって処理される型。この属性は、型推論が不可能なKeyDeserializerでは必須です。ValueSerializerまたはValueDeserializerでは、ジェネリクス型から推論された型のサブクラスに処理を限定するために使用できます。- 戻り値:
- コンポーネントが処理する型
- デフォルト:
{}
scope