一、前言
突发奇想,从网上找个项目练一下,结果正常导入之后依赖好多报红,突然意识到应该是maven配置没有改
二、错误描述及原因分析
2.1 错误描述
org.springframework.boot:spring-boot-starter-parent:pom:2.7.3 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.3 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.7.3/spring-boot-starter-parent-2.7.3.pom
2.2 原因分析
没有手动设置IDEA中的maven配置,所以IDEA会默认去“https://repo.maven.apache.org/maven2”这个路径找jar包,那么就会出现解析不了的情况而报错!
三、问题解决
配置一下maven即可
手动设置之前:
更改配置之后:
四、结束
每日分享:燕草如碧丝,秦桑低绿枝。
有任何疑问欢迎私信指教!!!