获取数据时 报了 toStirng()的栈溢出
java.lang.StackOverflowError
at java.lang.Integer.toString(Integer.java:935)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.fpy.pojo.Menu.toString(Menu.java:20)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractCollection.toString(AbstractCollection.java:462)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:300)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.fpy.pojo.Role.toString(Role.java:78)
因为做多表查询时,toString()方法内相互含有对方的对象