Answer: Hibernate OneToMany java.lang.StackOverflowError

answer re: Hibernate OneToMany java.lang.StackOverflowError

Jun 6 ’19
10

I had this error because I was parsing a list of objects mapped on both sides @OneToMany and @ManyToOne to json using jackson which caused an infinite loop.

If you are in the same situation you can solve this by using @JsonManagedReference and @JsonBackReference annotations.

Definitions from API :

  • JsonManagedReference…

Open Full Answer

原文链接:Answer: Hibernate OneToMany java.lang.StackOverflowError

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容