易大师不易 2019-04-03 14:28 采纳率: 80%
浏览 7170
已采纳

Springboot2.2.0.M1 +swagger2 报错

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.PluginRegistry.getPluginFor(Ljava/lang/Object;Lorg/springframework/plugin/core/Plugin;)Lorg/springframework/plugin/core/Plugin;

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

jar:file:/E:/apache-maven-3.6.0/repository_all/org/springframework/plugin/spring-plugin-core/2.0.0.M1/spring-plugin-core-2.0.0.M1.jar!/org/springframework/plugin/core/PluginRegistry.class

It was loaded from the following location:

file:/E:/apache-maven-3.6.0/repository_all/org/springframework/plugin/spring-plugin-core/2.0.0.M1/spring-plugin-core-2.0.0.M1.jar

Action:

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


io.springfox
springfox-swagger2
2.9.2


io.springfox
springfox-swagger-ui
2.9.2

看情况是jar包冲突没有找到:

这个包是springfox-swagger2.jar依赖引入的,但是找不出是那里冲突了,为什么找不到类

  • 写回答

4条回答 默认 最新

  • 易大师不易 2019-04-04 17:28
    关注

    该问题已解决:强制依赖

    <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-core</artifactId>
                <version>1.2.0.RELEASE</version><!--$NO-MVN-MAN-VER$-->
            </dependency>
            <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-metadata</artifactId>
                 <version>1.2.0.RELEASE</version><!--$NO-MVN-MAN-VER$-->
            </dependency>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 已采纳回答 1月27日

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分