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里面去吧对应的依赖注释掉,如图,然后再重新启动
最后启动成功。