admin管理员组

文章数量:1590157

1、描述

正在愉快的写代码,突然报错

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

Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove
 the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting 
 spring.main.allow-circular-references to true.

截图

根据报错我们很容易就可以理解了,是由于我在userService和EchoSerice两个类里循环引用了对方,找到问题所在就好解决了,我去把userService里注入的echoService去掉,问题解决!

本文标签: applicationbeansdependenciescycleForm