
json
韦禾水
我笑点低
展开
-
后台传递json数据到前台时报There is a cycle in the hierarchy!
实体Menu有两个属性 private Set roleMenus = new HashSet(0); private Set newsMenus = new HashSet(0); 因此在查询出List<Menu> menuList,并转换成json数据时, 这两个属性互相引用造成了死循环,于是报错:There is a cycl...原创 2014-07-23 13:34:27 · 161 阅读 · 0 评论 -
hibernate代理对象在用gson序列化时出错
目的:把对象A序列化成json字符串传递到前台读取 遇到的问题:对象A中的属性B是一个引用对象,得到的json串中该引用的值如下 { "CGLIB$BOUND":true, "CGLIB$CONSTRUCTED":true, "booleanProperty":true, "anotherBooleanProperty":true, }…… 看起来像CGLIB代理对...2016-11-29 11:24:13 · 364 阅读 · 0 评论