Spring Boot @ManyToOne only Id @JsonProperty
问题 help me find JSON property annotation who give me choose an entity property to JSON serialization. I need only one. I code like that: @Entity @Table(name = "pages") public class Page { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "name") private String name; @JsonIgnoreProperties(value = {"name", "description", "pages"}) // it's working, but I want to simplify, I need only project id property to JSON @ManyToOne(fetch = FetchType