今天新建的一个spring boot maven项目,

写启动类时发现无法引入SpringApplication,

经查原来是冲突了,我早些时候用了比较低版本的spring boot创建了项目

,导致电脑用户文件夹下有旧版本的配置,现在用新的版本导致了冲突

,那么只要删除冲突的老版本,文件夹地址

C:\Users\hanfuqingshi\.m2\repository\org\springframework\boot\spring-boot

下的2.0.0.RELEASE为新版本,而其它的为老版本,删除老版本后,

在IDE 项目右键Run As - maven clean 在maven install

,最后maven - update project即可。

相关文章:

  • 2021-06-13
  • 2021-08-14
  • 2021-08-13
  • 2021-11-14
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-08
  • 2021-11-12
  • 2021-10-17
  • 2021-11-19
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案