首页 > 移动平台 > 详细

启动项目报错Correct the classpath of your application so that it contains a single, compatible version of xxx

时间:2020-05-23 15:42:23      阅读:88      评论:0      收藏:0      [点我收藏+]

项目是基于Gradle构建的,在整合swagger后,启动项目时报错了。报错日志:

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.plugins.DocumentationPluginsManager.createContextBuilder(DocumentationPluginsManager.java:152)

The following method did not exist:

    ‘org.springframework.plugin.core.Plugin org.springframework.plugin.core.PluginRegistry.getPluginFor(java.lang.Object, org.springframework.plugin.core.Plugin)‘

The method‘s class, org.springframework.plugin.core.PluginRegistry, is available from the following locations:

    jar:file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/org.springframework.plugin/spring-plugin-core/2.0.0.RELEASE/95fc8c13037630f4aba9c51141f535becec00fe6/spring-plugin-core-2.0.0.RELEASE.jar!/org/springframework/plugin/core/PluginRegistry.class

It was loaded from the following location:

    file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/org.springframework.plugin/spring-plugin-core/2.0.0.RELEASE/95fc8c13037630f4aba9c51141f535becec00fe6/spring-plugin-core-2.0.0.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry

百度之后,发现是jar包冲突了,导入了两个不同版本的jar包。如图:

技术分享图片

解决办法可以直接将依赖中的jar包剔除掉,或者直接删除该依赖也行。

启动项目报错Correct the classpath of your application so that it contains a single, compatible version of xxx

原文:https://www.cnblogs.com/ruiyeclub/p/12942572.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!