Spring Boot 启动报错:
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'configDataContextRefresher' defined
in class path resource
一、解决方法:
更改 spring-boot-starter-parent 的版本
更改前:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
运行结果
更改后:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
运行结果
二、如遇更改失败版本号爆红如何更改
解决方法:
第一步
第二步
然后重新加载一下maven依赖就好了