一. 问题:在pom.xml文件中导入spring坐标报错
··· 控制台输出错误信息:
Cannot resolve org.springframework:spring-context:pom:5.2.10.RELEASE 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:spring-context:pom:5.2.10.RELEASE from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/springframework/spring-context/5.2.10.RELEASE/spring-context-5.2.10.RELEASE.pom
··· 如图:

二. 解决方法
·· 步骤1:找到 springframework 目录文件,将其删除,并重启IDEA后再在pom.xml文件中重新导入Spring坐标。

··· 步骤2:若成功导入spring坐标,则 springframework 目录文件中可以看到以下文件。若导入失败,则多次重复步骤1操作。

本文介绍了解决在pom.xml文件中导入spring坐标时遇到的问题,包括错误信息提示及详细解决步骤。
1361

被折叠的 条评论
为什么被折叠?



