Infinite Recursion with Jackson JSON and Hibernate JPA issue

前端 未结 25 3139
你的背包
你的背包 2020-11-21 07:31

When trying to convert a JPA object that has a bi-directional association into JSON, I keep getting

org.codehaus.jackson.map.JsonMappingException: Infinite          


        
25条回答
  •  灰色年华
    2020-11-21 07:39

    VERY IMPORTANT: If you are using LOMBOK, make shure to exclude attributes of collections like Set, List, etc...

    Like this:

    @EqualsAndHashCode(exclude = {"attributeOfTypeList", "attributeOfTypeSet"})
    

提交回复
热议问题