问题描述:
IDEA导入maven项目后,下载jar包的时候,控制台报错,报错信息如下:
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
原因:
没有设置IDEA中的maven配置,还是默认的样子,所以IDEA会自然地去“https://repo.maven.apache.org/maven2”这个路径找jar包,那么就会出现解析不了的情况
解决方案:
修改IDEA的maven配置即可,修改后如下:文章来源:https://www.toymoban.com/news/detail-651700.html
然后重新加载依赖,即可解决文章来源地址https://www.toymoban.com/news/detail-651700.html
到了这里,关于failed to transfer from https://repo.maven.apache.org/maven2错误解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!