Spring JPA bi-directional cannot evaluate toString

后端 未结 3 1366
南笙
南笙 2021-02-12 13:03

I have resolved JSON recursive loop with @JsonIdentityInfothrough to Baeldung\'s blog1 (Thanks)

But now, another error occurs :

Method threw         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-12 13:33

    Well, my guess is that Registration.toString() prints the string representation of each payment in the list, and since Payment.toString() includes the string representation of Registration, Registration.toString() is called again, which in turn calls Payment.toString() again, and so on.

    Try to return an empty string in Payment.toString() to see if the problem goes away.

提交回复
热议问题