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…
原文链接:Answer: Hibernate OneToMany java.lang.StackOverflowError
© 版权声明
THE END
暂无评论内容