springboot:问题Project ‘org.springframework.boot:spring-boot-starter-parent:2.5.6‘ not found 8


    org.springframework.boot
    spring-boot-starter-parent
    2.5.6
     

依赖报红色却能运行,发现本地仓库中是没有这个版本的依赖的,阿里云远程仓库也没收到,估计中央仓库才有。

springboot:问题Project ‘org.springframework.boot:spring-boot-starter-parent:2.5.6‘ not found 8_第1张图片

解决:

Invalidate Caches/Restart清理一下idea缓存。因为如果之前用过老版本的springboot开发,下次新建springboot项目,idea默认会缓存父依赖项信息,当引入本地仓库不存在的父依赖版本时,就会报错:找不到依赖申明。而引用本地仓库已存在的依赖版本并不会报错,因此才推断出是idea缓存的原因。清除缓存之后,重启,刷新pom.xml,发现自动下载新版本的springboot了,下载完成后不再报红。

springboot:问题Project ‘org.springframework.boot:spring-boot-starter-parent:2.5.6‘ not found 8_第2张图片

springboot:问题Project ‘org.springframework.boot:spring-boot-starter-parent:2.5.6‘ not found 8_第3张图片

 

你可能感兴趣的:(bug,spring,boot,spring,java)