JAXB A cycle is detected in the object graph

后端 未结 4 814
说谎
说谎 2020-12-19 11:59

I want to convert my pojo to json with JAXB, my pojo have one to many relation, and when i convert my pojo to json, JAXB generate error \"A cycle is detected in the object g

4条回答
  •  一生所求
    2020-12-19 12:24

    You have a cyclic reference problem in your definition.

    Try putting @XmlTransient above the problematic definition.

    Also, about XmlID and string type, see http://markmail.org/message/up6vrzjixxrvy5th.

提交回复
热议问题