引入Swagger2导致出错:Correct the classpath of your application so that it contains compatible versions of the classes springfox.documentation.schema.DefaultModelDependencyProvider and com.google.common.collect.FluentIterable

2023年9月18日 258点热度 0人点赞 0条评论

引入swagger2导致的问题
以下出错的解决办法:
Action:
Correct the classpath of your application so that it contains compatible versions of the classes springfox.documentation.schema.DefaultModelDependencyProvider and com.google.common.collect.FluentIterable

很明显是依赖冲突带来的问题。
查看依赖:
出错:Correct the classpath of your application so that it contains compatible versions of the classes springfox.documentation.schema.DefaultModelDependencyProvider and com.google.common.collect.FluentIterable
可以看到冲突的地方画了红线
接下来就是排除依赖:

<dependency>
     <groupId>com.github.binarywang</groupId>
     <artifactId>java-emoji-converter</artifactId>
     <version>0.1.1</version>
     <exclusions>
           <exclusion>
           <groupId>com.google.guava</groupId>
           <artifactId>guava</artifactId>
           </exclusion>
     </exclusions>
</dependency>

小小调酒师

此刻打盹,你将做梦; 此刻学习,你将圆梦。 个人邮箱:shellways@foxmail.com

文章评论