冀教网 - 河北教师网站 - 专注于冀教版课本资源

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 73|回复: 0

启动项目报错Correct the classpath of your application so that it conta

[复制链接]

4万

主题

4万

帖子

12万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
124999
发表于 2020-5-23 21:33 | 显示全部楼层 |阅读模式
项目是基于Gradle构建的,在整合swagger后,启动项目时报错了。报错日志:
  1. 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.classIt 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.jarAction:Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry
复制代码
百度之后,发现是jar包冲突了,导入了两个不同版本的jar包。如图:
我的关键词 启动项目报错Correct the classpath of your application so that it conta  新闻资讯 1816004-20200523145929298-1631078916

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

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|冀教网 - 河北教师网站 - 专注于冀教版课本资源  

GMT+8, 2020-6-3 23:46 , Processed in 0.343132 second(s), 30 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表