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

370 阅读1分钟

记录个错误,springboot项目启动是报错

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

循环依赖了, 这里找不太好找,哪里出现的循环依赖,这里就直接提出了一个暴力解决问题哈哈,百试不爽。不过建议还是找到哪里循环依赖,搞定他比较好

在application 的main方法中更改如下

SpringApplication springApplication = new SpringApplication(ManageApplication.class);
springApplication.setAllowCircularReferences(Boolean.TRUE);
springApplication.run(args);

重启即可了!

喜欢,请关注公众号《coder练习生》