org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError)

前端 未结 5 680
余生分开走
余生分开走 2021-01-21 10:14

I am trying out some very basic webservice. I get this exception everytime I try to return the Prtnr object.

Uncaught exception thrown in one of the service met         


        
5条回答
  •  清酒与你
    2021-01-21 11:02

    This is quite a common scenario for me when you are trying to convert entity classes into JSON format. The simplest solution is just to use @JsonIgnore on the reverse mapping to break the cycle.

提交回复
热议问题