yuxiaona

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>

 

发表于 2017-01-07 10:59  小娜与明羽  阅读(31958)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-07-14
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-04-19
  • 2021-08-28
  • 2022-12-23
相关资源
相似解决方案