Ana*_*rhy 2 spring-security spring-boot
在 Spring Boot 2.7.4 中,WebSecurityConfigurerAdapter包含该authenticationManagerBean函数的类已被弃用
还有什么选择呢?
这些天我也遇到了和你一样的问题,找到的唯一解决方案是这个
@Bean
public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception {
return authenticationConfiguration.getAuthenticationManager();
}
Run Code Online (Sandbox Code Playgroud)
但这导致我在测试中出现异常。我在 GitHub 上发布了一个 spring-boot 问题。请查看以了解最新情况。 https://github.com/spring-projects/spring-framework/issues/29215 这可能是一个错误
| 归档时间: |
|
| 查看次数: |
1775 次 |
| 最近记录: |