@TargetSE(valueSE=TYPESE) @RetentionSE(valueSE=RUNTIMESE) @DocumentedSE @Component public @interface JsonComponent
JsonComponentModule の使用中に Jackson に登録される JsonSerializer、JsonDeserializer または KeyDeserializer 実装を提供する @Component。実装に直接アノテーションを付けるため、または実装を内部クラスとして含むクラスに使用できます。例:
@JsonComponent
public class CustomerJsonComponent {
public static class Serializer extends JsonSerializer<Customer> {
// ...
}
public static class Deserializer extends JsonDeserializer<Customer> {
// ...
}
}
JsonComponentModule@AliasFor(annotation=org.springframework.stereotype.Component.class) public abstract StringSE value
public abstract ClassSE<?>[] type
KeyDeserializer の型は推測できないため、この属性は必須です。JsonSerializer または JsonDeserializer の場合、ジェネリクスから推論された型のサブクラスに処理を制限するために使用できます。public abstract JsonComponent.Scope scope
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.