当前位置: 首页 > 工具软件 > TA Spring > 使用案例 >

【异常】记一次因修复漏洞扫描导致SpringSecurity出现的循环依赖问题

赖杰
2023-12-01

一、循环依赖问题


APPLICATION FAILED TO START


Description:

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

┌─────┐
| springSecurityConfig (field private XXXX.config.MyauthenticationProvider XXXX.config.SpringSecurityConfig.myauthenticationProvider)
↑ ↓
| myauthenticationProvider (field private org.springframework.security.crypto.password.PasswordEncoder XXXX.config.MyauthenticationProvider.passwordEncoder)
└─────┘

Action:

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.

进程已结束,退出代码为 0

二、背景说明

最近也没有啥变更啊,有的就是因为客户漏洞扫描的时候,反馈了说我们的Spring框架出问题了,第一直接就是SpringBoot的版本有问题&#x

 类似资料: