spring boot项目启动失败,Correct the classpath of your application

springboot项目启动时出现Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterable错误
***************************
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.schema.DefaultModelDependencyProvider.dependentModels(DefaultModelDependencyProvider.java:79)

The following method did not exist:

    com.google.common.collect.FluentIterable.concat(Ljava/lang/Iterable;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:/D:/repository/com/google/guava/guava/18.0/guava-18.0.jar!/com/google/common/collect/FluentIterable.class

It was loaded from the following location:

file:/D:/repository/com/google/guava/guava/18.0/guava-18.0.jar
Action:

Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterable

Disconnected from the target VM, address: '127.0.0.1:64629', transport: 'socket'

Process finished with exit code 1

在这里插入图片描述程序启动时报错,报错提示大概意思是:试图调用不存在的方法,纠正应用程序的类路径,使其包含com.google.common. collection . fluentiterable的单一兼容版本。后面这句大概类似于提示依赖冲突,而冲突的包也给了出来,
file:/D:/repository/com/google/guava/guava/18.0/guava-18.0.jar
我的是guava-18.0.jar,然后打pom里面去吧对应的依赖注释掉,如图,然后再重新启动
在这里插入图片描述
最后启动成功。

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值