更换springboot版本后  @SpringBootApplication无法被解析引入。

项目启动过程中报错

更换springboot版本后项目报错SpringBootApplication cannot be resolved to a type
错误原因是因为springboot的包冲突了所致。需要删掉 repository\org\springframework\boot 目录下的spring-boot-autoconfigure 文件夹,然后在工程中maven -> update project

 

如果还报错,建议更换版本号测试

相关文章: