我认为您必须在@JsonIdentityInfo和@ JsonBackReference / @ JsonManagedReference之间进行选择。
我会在您的实体上使用@JsonIdentityInfo(generator =
ObjectIdGenerators.PropertyGenerator.class,property =“ id”),删除@
JsonBackReference / @ JsonManagedReference对。
并在要排除的字段上添加@JsonIgnore。

我认为您必须在@JsonIdentityInfo和@ JsonBackReference / @ JsonManagedReference之间进行选择。
我会在您的实体上使用@JsonIdentityInfo(generator =
ObjectIdGenerators.PropertyGenerator.class,property =“ id”),删除@
JsonBackReference / @ JsonManagedReference对。
并在要排除的字段上添加@JsonIgnore。