解决maven版本冲突的方法

在项目开发过程中,下载了jar包之后,突然遇上了以下的报错:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:117)

The following method did not exist:

    com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;

The method's class, com.google.common.collect.FluentIterable, is available from the following locations:

    jar:file:/perfadditionaccumulate-latest.jar!/BOOT-INF/lib/guava-15.0.jar!/com/google/common/collect/FluentIterable.class

It was loaded from the following location:

    jar:file:/perfadditionaccumulate-latest.jar!/BOOT-INF/lib/guava-15.0.jar!/

对于这个报错,我根本看不明白,只能隐约觉得是jar包之类的报错,但又不知道从何解决,苦想而不知道如何解决,最后在网上找到了一篇博客,抱着一试的态度,鼓捣了一阵,没想到居然成功了,实在是太开心了。

另外,发现网上对这个错误的解决文章很少(就连扯皮的文章都没),导致资料有点少,为了以后网友能搜到的资料多一点,在此,我厚着脸皮将博主:雨后浅浅唱的文章转载过来,以下附上原文链接:
       原文链接:https://blog.csdn.net/my13413527259/article/details/85779625

以上链接内容是原文的思路,对于本文的报错,指向了guava-15.0有问题,没有包含该方法,我们尝试着用最新版本的guava-20.0。在idea的pom文件加入如下内容:

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
        </dependency>

加入之后,重新运行项目,bingo,项目成功启动了。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值