要处理“嵌入式”对象,您应该使用
@JsonUnwrapped它-等同于Hibernate的
@Embeddable/
@Embedded。
class Item { private String title; @JsonProperty("date") private Date createdAt; // How to map this? @JsonUnwrapped private Author author;}
要处理“嵌入式”对象,您应该使用
@JsonUnwrapped它-等同于Hibernate的
@Embeddable/
@Embedded。
class Item { private String title; @JsonProperty("date") private Date createdAt; // How to map this? @JsonUnwrapped private Author author;}