the dependencies of some of the beans in the application context form a cycle

前些天在项目发布启动中遇到这个“the dependencies of some of the beans in the application context form a cycle”问题
在这里插入图片描述
由字面意思就知道是因为代码中存在着循环依赖致使的,因而我便在代码中查找到底哪些注入互相引用了,有时代码之间依赖太复杂,人工查找的话太耗费时力,使用idea的话就很容易能查找到,我简单说一下在idea中怎样查找是否有相互依赖。web

选择报循环依赖的地方右键选择diagrams
在这里插入图片描述app

接着
在这里插入图片描述ide

而后就能够看到你文件夹下全部的类
在这里插入图片描述svg

右键选择Show Dependencis
在这里插入图片描述idea

就能够查看到全部类依赖的状况,我这里就能清楚的看出哪里相互引用了
在这里插入图片描述3d

清除其中一个依赖后问题解决
在这里插入图片描述orm