循环依赖-兼容问题
1.报错
2.6.0 以后的版本默认禁止 Bean 之间的循环引用
it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
2.解决
如果有时间把代码的循环依赖部分改了。但我知道大多数人不会这么老实的。不动代码的话,就改一个配置,新增:
spring:
main:
#兼容boot2.6.7处理循环依赖问题
allow-circular-references: true