现象:

  1.报错:There is a cycle in the hierarchy!

  2.返回至前台的json不完整,字段丢失。

错误原因:

  eg:entity1的属性有list<entitiy2>,entity2的字段中也含有entity1,即常见的双向关联;引发的死循环

解决方案:

  1.重写一个vo用于传输json

  2.@JsonIgnore

相关文章:

  • 2021-11-02
  • 2021-06-13
  • 2021-12-21
  • 2022-02-17
  • 2022-12-23
  • 2021-11-13
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案