Annotation as shortcut for another annotation?
问题 How can I create an annotation, such as @DateOutput that is equivalent with another Jackson annotation, such as: @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="UTC") Or ideally, to a set of annotations, such as @JsonSerialize(using = XSerializer.class) @JsonDeserialize(using = XDeserializer.class) 回答1: You can use @JacksonAnnotationsInside as a annotation container like follows: @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD,