Java+Hibernation+MySQL的@JsonIgnore注解
当表间有One2Many或Many2One时,会发生无限循环的场景,如何破?
只要在Set方法前增加以下注解即可:
@JsonIgnore public Set xxxs() { return this.xxxYyyy; }
Java+Hibernation+MySQL的@JsonIgnore注解当表间有One2Many或Many2One时,会发生无限循环的场景,如何破? 只要在Set方法前增加以下注解即可: @JsonIgnore public Set xxxs() { return this.xxxYyyy; }
|