我正在尝试以下示例
并且在 Intellij IDEA 中运行正常,没有任何错误。但是当我在pom.xml中将 Spring Boot 版本从2.4.4更改为2.7.1时,它会抛出 IDE 错误:
无法自动装配。 未找到以下“HttpSecurity”类型的 bean :
@Bean
public SecurityFilterChain configuration(HttpSecurity httpSecurity) throws Exception {
..........................
Run Code Online (Sandbox Code Playgroud)
该应用程序运行良好,但有兴趣知道为什么会发生这种情况。IDE版本为IntelliJ IDEA 2022.1(终极版)