springdata jpa发生java.lang.StackOverflowError: null

本文解决了一个在使用SpringDataJPA实现一对多关系时遇到的StackOverflowError问题,通过重写toString()方法和使用@JsonIgnore注解避免了User和Dept实体间的无限递归调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

需求是这样的。使用springdata jpa 一对多的关联关系。User.class实体, 和Dept.class 实体, 一个用户对应一个部门,一个部门可以有多个用户。

然后出现一个如下异常:java.lang.StackOverflowError: null(堆栈溢出错误, 写代码时出现的错误)

出现栈内存溢出的常见原因有2个: 
1. 函数递归调用层次过深,每调用一次,函数的参数、局部变量等信息就压一次栈,并且没有及时出栈。 
2. 局部静态变量体积太大

2019-10-24 10:45:31.806 ERROR 3884 --- [nio-8013-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis.serializer.SerializationException: Could not write JSON: Infinite recursion (StackOverflowError) (through reference chain: com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"]->org.hibernate.collection.internal.PersistentBag[0]->com.gosuncn.springboot.bean.User["deptBean"]->com.gosuncn.springboot.bean.Dept["userList"])] with root cause

java.lang.StackOverflowError: null

出现异常的原因:如果查询一个User实体,并打印,打印调用的是toString() 方法,toString()方法里面又有关联Dept对象。 所以导致User和Dept两个对象互相调用并打印,形成一个递归调用,最后堆栈溢出。

解决方法:

1:重写两个实体的toString() 方法。关联对象不写进toString()方法里面。(使用lombok的@ToString(exclude={"userList"}))

2:在关联对象上,都加上一个@JsonIgnore 注解。

解决后的两个实体类代码:

User.class

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(exclude={"deptBean"})
@Entity
@Table(name = "user")
public class User implements Serializable {


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    private String username;
    private String password;
    private long high;

    // optional = false 表示可选属性,此时表示dept不能为空。删除用户,不影响部门。
    @JsonIgnore   //  设置@JsonIgnore,这个注解的意思是表示在序列化的时候,忽略这个属性
    @ManyToOne(cascade = {CascadeType.MERGE,CascadeType.REFRESH}, optional = false)
    @JoinColumn(name = "dept_id")  // 设置在dept表中的关联外键
    private Dept deptBean;
    
}

Dept.class

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString(exclude={"userList"})
@Entity
@Table(name = "dept")
public class Dept implements Serializable {


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String name;
    private Integer peoples;

    /**
     * mappedBy = "deptBean" 中的 deptBean 是指 User 实体中的 deptBean 属性。
     */
    //@JsonIgnore     // 设置@JsonIgnore,这个注解的意思是表示在序列化的时候,忽略这个属性
    @OneToMany(mappedBy = "deptBean", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<User> userList;


}

User.class 的关联对象使用@JsonIgnore 这个注解,而Dept.class 的关联对象不能用@JsonIgnore 这个注解。原因是和toString()这个方法一样。有兴趣的可以研究研究。试试User对象的插入和查询,就知道了。

以上解决方法,亲测有效。。。

希望此文帮助到你!

 

2025-06-06 16:35:20.493 ERROR 27200 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bancaiService': Unsatisfied dependency expressed through field 'bancaiRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bancaiRepository' defined in com.kucun.dataDo.BancaiRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Using named parameters for method public abstract java.lang.Integer com.kucun.dataDo.BancaiRepository.findComplexidCOUNT(java.lang.Integer,java.lang.Integer,java.lang.Integer) but parameter 'Optional[caizhiid]' not found in annotated query 'SELECT COUNT(b) FROM Bancai b JOIN b.caizhi c JOIN b.mupi1 m1 JOIN b.mupi2 m2 WHERE c.name = :caizhiName AND m1.name = :mupi1Name AND m2.name = :mupi2Name'! at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:173) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:153) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:95) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.37] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) [catalina.jar:9.0.37] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) [catalina.jar:9.0.37] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) [catalina.jar:9.0.37] at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133) [catalina.jar:9.0.37] at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1866) [catalina.jar:9.0.37] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_331] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_331] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.37] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) [na:1.8.0_331] at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045) [catalina.jar:9.0.37] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429) [catalina.jar:9.0.37] at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) [catalina.jar:9.0.37] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) [catalina.jar:9.0.37] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) [catalina.jar:9.0.37] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.37] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [catalina.jar:9.0.37] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [catalina.jar:9.0.37] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_331] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.37] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_331] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [catalina.jar:9.0.37] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.37] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.37] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) [catalina.jar:9.0.37] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.37] at org.apache.catalina.startup.Catalina.start(Catalina.java:738) [catalina.jar:9.0.37] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_331] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_331] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_331] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_331] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) [bootstrap.jar:9.0.37] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.37] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bancaiRepository' defined in com.kucun.dataDo.BancaiRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Using named parameters for method public abstract java.lang.Integer com.kucun.dataDo.BancaiRepository.findComplexidCOUNT(java.lang.Integer,java.lang.Integer,java.lang.Integer) but parameter 'Optional[caizhiid]' not found in annotated query 'SELECT COUNT(b) FROM Bancai b JOIN b.caizhi c JOIN b.mupi1 m1 JOIN b.mupi2 m2 WHERE c.name = :caizhiName AND m1.name = :mupi1Name AND m2.name = :mupi2Name'! at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] ... 62 common frames omitted Caused by: java.lang.IllegalStateException: Using named parameters for method public abstract java.lang.Integer com.kucun.dataDo.BancaiRepository.findComplexidCOUNT(java.lang.Integer,java.lang.Integer,java.lang.Integer) but parameter 'Optional[caizhiid]' not found in annotated query 'SELECT COUNT(b) FROM Bancai b JOIN b.caizhi c JOIN b.mupi1 m1 JOIN b.mupi2 m2 WHERE c.name = :caizhiName AND m1.name = :mupi1Name AND m2.name = :mupi2Name'! at org.springframework.data.jpa.repository.query.JpaQueryMethod.assertParameterNamesInAnnotatedQuery(JpaQueryMethod.java:172) ~[spring-data-jpa-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.jpa.repository.query.JpaQueryMethod.<init>(JpaQueryMethod.java:139) ~[spring-data-jpa-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.jpa.repository.query.DefaultJpaQueryMethodFactory.build(DefaultJpaQueryMethodFactory.java:44) ~[spring-data-jpa-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:81) ~[spring-data-jpa-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lookupQuery(QueryExecutorMethodInterceptor.java:99) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lambda$mapMethodsToQuery$1(QueryExecutorMethodInterceptor.java:92) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_331] at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_331] at java.util.Collections$UnmodifiableCollection$1.forEachRemaining(Collections.java:1051) ~[na:1.8.0_331] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_331] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_331] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_331] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_331] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_331] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_331] at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.mapMethodsToQuery(QueryExecutorMethodInterceptor.java:94) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lambda$new$0(QueryExecutorMethodInterceptor.java:84) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_331] at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.<init>(QueryExecutorMethodInterceptor.java:84) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:332) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$4(RepositoryFactoryBeanSupport.java:294) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.util.Lazy.getNullable(Lazy.java:211) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.util.Lazy.get(Lazy.java:95) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) ~[spring-data-commons-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:144) ~[spring-data-jpa-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1858) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795) ~[spring-beans-5.2.15.RELEASE.jar:5.2.15.RELEASE] ... 72 common frames omitted
最新发布
06-08
<think>我们遇到的问题是SpringDataJPA在创建Repositorybean时失败,具体是BancaiRepository中的一个方法findComplexidCOUNT有问题。错误信息指出:在注解的查询中使用了命名参数,但是方法参数中找不到对应的参数名。具体错误信息:Usingnamedparametersformethodpublicabstractjava.lang.Integercom.kucun.dataDo.BancaiRepository.findComplexidCOUNT(java.lang.Integer,java.lang.Integer,java.lang.Integer)butparameter'Optional[caizhiid]'notfoundinannotatedquery'SELECTCOUNT(b)FROMBancaibJOINb.caizhicJOINb.mupi1m1JOINb.mupi2m2WHEREc.name=:caizhiNameANDm1.name=:mupi1NameANDm2.name=:mupi2Name'分析:1.方法定义:findComplexidCOUNT有三个Integer类型的参数。2.查询语句中使用了三个命名参数::caizhiName,:mupi1Name,:mupi2Name。3.但是方法参数名(在编译后)可能是arg0,arg1,arg2(如果没有使用-parameters编译参数)或者实际的参数名(如果使用了-parameters)。4.SpringDataJPA在尝试将方法参数与查询中的命名参数绑定时会根据参数名匹配,而这里显然没有匹配上。解决方案:1.使用@Param注解显式指定参数名。2.修改方法定义,让参数名与查询中的命名参数名一致。步骤:修改BancaiRepository接口中的方法,在参数前添加@Param注解,指定名称。代码示例:```javapublicinterfaceBancaiRepositoryextendsJpaRepository<Bancai,Long>{//修改后的方法:使用@Param注解@Query("SELECTCOUNT(b)FROMBancaibJOINb.caizhicJOINb.mupi1m1JOINb.mupi2m2WHEREc.name=:caizhiNameANDm1.name=:mupi1NameANDm2.name=:mupi2Name")IntegerfindComplexidCOUNT(@Param("caizhiName")IntegercaizhiId,@Param("mupi1Name")Integermupi1Id,@Param("mupi2Name")Integermupi2Id);}```注意:这里我假设了参数的类型,但根据查询,我们比较的是c.name(字符串),但方法参数是Integer类型。这可能会导致类型不匹配。你可能需要根据实际情况调整参数类型(比如改为String)或者调整查询(比如比较的是id而不是name)。但错误主要是参数名绑定问题,所以先解决参数名问题。另外,观察错误信息中的方法参数是三个Integer,而查询中比较的是name(字符串)。这里可能也有问题,但当前错误主要是命名参数绑定失败。如果类型不匹配,也需要相应调整。这里假设实际需要的是按照name进行查询,那么参数类型应该是String。修改如下:```java@Query("SELECTCOUNT(b)FROMBancaibJOINb.caizhicJOINb.mupi1m1JOINb.mupi2m2WHEREc.name=:caizhiNameANDm1.name=:mupi1NameANDm2.name=:mupi2Name")IntegerfindComplexidCOUNT(@Param("caizhiName")StringcaizhiName,@Param("mupi1Name")Stringmupi1Name,@Param("mupi2Name")Stringmupi2Name);```如果实际意图是通过id查询,那么查询语句应该使用c.id(或其他id属性),并且参数类型保持Integer(或Long)即可。总结步骤:1.使用@Param注解明确指定参数名。2.确保参数类型与查询中使用的字段类型一致。预防措施:在编译时使用-parameters参数(对于Java8及以上),这样在编译时会保留方法参数名,可以不用@Param注解。但是为了兼容性和清晰性,建议使用@Param。另外,检查其他自定义查询方法是否有类似问题。配置编译参数(Maven):在pom.xml中配置:```xml<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><compilerArgs><arg>-parameters</arg></compilerArgs></configuration></plugin></plugins></build>```或者Gradle:```groovytasks.withType(JavaCompile){options.compilerArgs<< '-parameters'}```但即使使用了-parameters,也建议在复杂的查询方法中使用@Param,这样更明确。相关问题:1.SpringDataJPA中@Query的用法有哪些?2.如何解决JPA命名参数绑定失败的问题?3.编译时保留参数名的配置方法?4.在Repository中自定义查询方法时需要注意什么?5.如何调试SpringDataJPA的查询方法?</think> ### 错误分析与解决方案 #### 核心问题 Spring Data JPA 在创建 `BancaiRepository` 时失败,原因是自定义查询方法 `findComplexidCOUNT` 中使用的命名参数(`:caizhiName`, `:mupi1Name`, `:mupi2Name`)未能在方法参数列表中找到对应的 `@Param` 定义。 ### 修复代码示例 ```java // BancaiRepository.java import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.data.jpa.repository.JpaRepository; public interface BancaiRepository extends JpaRepository<Bancai, Long> { // 修复后的查询方法:使用@Param注解匹配命名参数 @Query("SELECT COUNT(b) FROM Bancai b " + "JOIN b.caizhi c " + "JOIN b.mupi1 m1 " + "JOIN b.mupi2 m2 " + "WHERE c.name = :caizhiName " + "AND m1.name = :mupi1Name " + "AND m2.name = :mupi2Name") Integer findComplexidCOUNT( @Param("caizhiName") Integer caizhiId, @Param("mupi1Name") Integer mupi1Id, @Param("mupi2Name") Integer mupi2Id ); } ``` ### 关键修复点解释 1. **添加 `@Param` 注解** 为每个方法参数添加 `@Param("parameterName")` 注解,使参数名称与 JPQL 中的命名参数完全匹配: - `@Param("caizhiName")` → `:caizhiName` - `@Param("mupi1Name")` → `:mupi1Name` - `@Param("mupi2Name")` → `:mupi2Name` 2. **参数命名一致性** 确保方法参数命名与业务语义一致(例如使用 `caizhiId` 代替 `caizhiid`),提高代码可读性 3. **关联关系验证** 确认 `Bancai` 实体类中已正确定义关联关系: ```java @Entity public class Bancai { @ManyToOne @JoinColumn(name = "caizhi_id") private Caizhi caizhi; // 材质实体 @ManyToOne @JoinColumn(name = "mupi1_id") private Mupi mupi1; // 木皮1实体 @ManyToOne @JoinColumn(name = "mupi2_id") private Mupi mupi2; // 木皮2实体 } ``` ### 调试与验证配置 ```properties # application.properties # 启用SQL日志和参数绑定详情 spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE # 禁用启动时DDL验证(仅用于调试) spring.jpa.hibernate.ddl-auto=none ``` ### 替代解决方案(使用位置参数) ```java @Query("SELECT COUNT(b) FROM Bancai b " + "JOIN b.caizhi c " + "JOIN b.mupi1 m1 " + "JOIN b.mupi2 m2 " + "WHERE c.name = ?1 " + // ?1 表示第一个参数 "AND m1.name = ?2 " + "AND m2.name = ?3") Integer findComplexidCOUNT(Integer caizhiName, Integer mupi1Name, Integer mupi2Name); ``` ### 最佳实践建议 1. **始终使用 `@Param` 注解** 避免依赖编译器的参数名称保留(需 `-parameters` 编译选项) 2. **保持JPQL与参数类型一致** 如果查询中使用的是名称(`c.name`),参数类型应为 `String` 而非 `Integer` 3. **简化复杂查询** 对表JOIN查询,考虑使用Spring Data JPA的Specification或QueryDSL ---
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值