“目标”字段由Spring Data添加,因为它是一个惰性集合。因此就像Hibernate for JPA中的datahandler等。
选项1:要忽略它们,您只需要在类级别添加@JsonIgnoreProperties(value = {“ target”})
@document(collection = "song")@JsonIgnoreProperties(value = { "target" })public class Song { ...}选项2:使集合不懒惰

“目标”字段由Spring Data添加,因为它是一个惰性集合。因此就像Hibernate for JPA中的datahandler等。
选项1:要忽略它们,您只需要在类级别添加@JsonIgnoreProperties(value = {“ target”})
@document(collection = "song")@JsonIgnoreProperties(value = { "target" })public class Song { ...}选项2:使集合不懒惰