pom.xml里有紅叉報錯的解決辦法


pom.xml里有紅叉報錯的解決辦法一:

1.把鼠標點在報的錯上發現pom.xml報如下錯誤:

Multiple annotations found at this line:

- Failure to transfer org.slf4j:slf4j-log4j12:jar:1.7.21 from http://repo1.maven.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.slf4j:slf4j-log4j12:jar:1.7.21 from/
to central (http://repo1.maven.org/maven2): ConnectException

2.將pom.xml中的這個jar包刪掉

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.21</version>
</dependency>

解決辦法二:

項目右鍵,properties,java build path,找到meaven依賴里有紅叉的jar包,將pom.xml中的這個jar包刪掉即可

 使用spring cloud實現分布式配置管理時加入依賴后pom.xml第一行報錯

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>

解決辦法:給依賴添加版本號即可。

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
<version>1.2.2.RELEASE</version>
</dependency>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM