Sping Boot 3.2.0升级:使用RSocketSecurity时“Authentication Manager无法恢复”

t1qtbnec  于 2024-01-09  发布在  Spring
关注(0)|答案(1)|浏览(281)

我最近将我的Sping Boot 应用程序升级到3.2.0版(沿着Spring Framework 6.1.1和Spring Security 6.2.0)。升级后,我遇到了一个问题,contextLoads()测试用例单独失败,错误声明“authentication manager cannot be null”。该应用程序使用React式RSocketSecurity和JwtReactiveAuthenticationManager。
错误:起因:java.lang.IllegalArgumentException:authenticationManager不能为null
我尝试过的:定义Bean:我确保MapReactiveUserDetailsService和ObservationReactiveAuthenticationManager bean已定义,因为我的应用程序使用它们。
上一版本:我注意到在Sping Boot 3.1.3中,ReactiveAuthenticationManager是从应用程序上下文成功创建的,但在3.2.0中并非如此。
故障排除步骤:我已经检查了bean定义、配置顺序、组件扫描,甚至尝试简化安全配置,但问题仍然存在。
预期行为:我正在寻找关于如何正确配置Sping Boot 3.2.0中的ReactiveAuthenticationManager或任何其他必要组件以解决“authentication manager cannot be null”错误的见解或建议。任何关于在新的Sping Boot 版本的上下文中可能缺少或错误配置的指导都将非常感谢。

taor4pac

taor4pac1#

在GitHub上的Sping Boot 项目中有一个处理此bug的开放问题。似乎在WebSecurityConfiguration配置类(https://github.com/spring-projects/spring-boot/issues/38713)中存在错误配置。
该问题将在Sping Boot 3.2.1中解决,该版本将于2023年12月21日发布。

相关问题