解决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文件加入如下内容:

        
            com.google.guava
            guava
            20.0
        

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

你可能感兴趣的:(解决maven版本冲突的方法)