为什么有红色的线,报错?

为什么有红色的线,报错?

<project xmlns="http://maven.apache.org/POM/4.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.imooc</groupId>

<artifactId>maven-first</artifactId>

<version>1.0.0-RELEASE</version>

<dependencies>

<dependency>

<groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>

<version>5.1.47</version>

</dependency>

<dependency>

<groupId>com.belerweb</groupId>

<artifactId>pinyin4j</artifactId>

<version>2.5.1</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-webmvc</artifactId>

<version>5.1.1.RELEASE</version>

</dependency>

</dependencies>

</project>


http://img1.sycdn.imooc.com//climg/5f17775709fc126404850452.jpg

http://img1.sycdn.imooc.com//climg/5f17775709e9404d09990620.jpg


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
好帮手慕小脸 2020-07-23 09:50:12

同学你好,根据贴出的报错信息

无法获取org.springframework:spring-expression:jar:5.1.1.RELEASE 这个对应的jar包。

    这个可能是spring-expression:jar下载到本地仓库中时没有下载完成,出现问题,导致引用出现问题,建议同学去本地仓库中,查找.m2\repository下的org文件夹,打开后找到springframework文件夹,然后将该目录下的文件删除,在pom.xml文件中重新引入依赖再试试。

Ps:找目录的时候可以在C盘搜索.m2这个文件夹,然后在.m2\repository文件夹下搜索org文件夹

如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~

好帮手慕小脸 2020-07-22 11:58:30

同学你好,建议同学将鼠标放置报红位置处,查看具体错误是什么呢?

祝学习愉快~

  • 提问者 慕粉1465475474 #1
    Failure to transfer org.springframework:spring-expression:jar:5.1.1.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework:spring-expression:jar:5.1.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer org.springframework:spring-expression:jar:5.1.1.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework:spring-expression:jar:5.1.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:225) at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:193) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:559) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:483) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:401)
    2020-07-22 20:22:14
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师