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.
上面报错,可以通过在配置文件中配置如下属性以恢复正常。
在application.properties中配置如下
spring.main.allow-circular-references=true