There is a cycle in the hierarchy!
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/18 10:01:23
There is a cycle in the hierarchy!
List res = resourceService.findAll();
JSONArray datalist = JSONArray.fromObject(res);//这里报错there is a cycle in the hierarchy
用网上提供的方法不好使
下面是Resource属性
private Integer id;
\x05private String title;
\x05private String description;
\x05private Set roles = new HashSet();
Resource和Role有多对多的关系
Role的属性
private Integer id;
\x05private String roleName;
\x05private Set res = new HashSet();
List res = resourceService.findAll();
JSONArray datalist = JSONArray.fromObject(res);//这里报错there is a cycle in the hierarchy
用网上提供的方法不好使
下面是Resource属性
private Integer id;
\x05private String title;
\x05private String description;
\x05private Set roles = new HashSet();
Resource和Role有多对多的关系
Role的属性
private Integer id;
\x05private String roleName;
\x05private Set res = new HashSet();
有把有关联的属性放到json数组中就可以了.因为Resource的json数组中有roles数组,而且roles的数组元素中又有Resource数组,死循环了.用JSONConfig把roles去除就可以了.
英语翻译The hierarchy of medical occupations is in many ways a -
Source is in the hierarchy of the destination.什么意思
What is common management hierarchy in China?Which hierarchy
英语翻译There is a beautiful positive cycle that is created by l
is,in,plane,the,there,sky,a
There is a fork in the
There is a bird in the sky.
There is a baby in the bedroom.
There is ( ) "a" in the word "lake".
there is a river in the picture.
There is a desk in the classroom.
Is there a book in the desk?