通过此错误迁移到 Spring Boot 3.4.1
Description:
Parameter 0 of method setFilterChains in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a single bean, but 2 were found:
- webSocketAuthorizationManagerPostProcessor: defined by method 'webSocketAuthorizationManagerPostProcessor' in class path resource [org/springframework/security/config/annotation/web/socket/WebSocketObservationConfiguration.class]
- objectPostProcessor: defined by method 'objectPostProcessor' in class path resource [org/springframework/security/config/annotation/configuration/ObjectPostProcessorConfiguration.class]
This may be due to missing parameter name information
有推荐
Ensure that your compiler is configured to use the '-parameters' flag.
You may need to update both your build tool settings as well as your IDE.
(See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention)
我已按照 Spring Framework 6.1 迁移指南
中的建议配置了 Kotlin 设置构建.gradle.kts
tasks.withType<JavaCompile>() {
options.compilerArgs.add("-parameters")
}
错误依然存在
有什么想法吗?