相关疑难解决方法(0)

我无法将我的 web 应用程序更新到 Spring Boot 2.6.0(2.5.7 可以工作,但 2.6.0 不行)

正如标题中提到的,我无法将我的 web 应用程序更新到 Spring Boot 2.6.0。我使用 Spring Boot 2.5.5 编写了我的 web 应用程序,一切都运行良好。如果我使用这个新标签更新 pom.xml 文件:

\n
<version>2.5.7</version>\n
Run Code Online (Sandbox Code Playgroud)\n

我的网络应用程序运行完美。所有测试均有效。\n如果我执行此更新,则 Web 应用程序不会启动:

\n
<version>2.6.0</version>\n
Run Code Online (Sandbox Code Playgroud)\n

启动调试模式,IDE 向我显示一个错误和 2 个指向我的 web 应用程序的 2 个类的链接。

\n
2021-11-23 00:31:45.419 ERROR 21884 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed\n\norg.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'configurazioneSpringSecurity': Requested bean is currently in creation: Is there an unresolvable circular reference?\n
Run Code Online (Sandbox Code Playgroud)\n

看来问题出在这个类中:

\n
@Configuration\n@EnableWebSecurity\npublic class ConfigurazioneSpringSecurity extends WebSecurityConfigurerAdapter {\n\n    @Autowired\n    LivelliDeiRuoli livelliDeiRuoli;\n\n    @Autowired\n    GestioneUtentiSpringSecurity gestioneUtentiSpringSecurity;\n\n    @Bean\n    public BCryptPasswordEncoder …
Run Code Online (Sandbox Code Playgroud)

spring-mvc spring-security spring-boot

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

spring-boot ×1

spring-mvc ×1

spring-security ×1