zoukankan      html  css  js  c++  java
  • 启动项目报错Correct the classpath of your application so that it contains a single, compatible version of xxx

    项目是基于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包剔除掉,或者直接删除该依赖也行。

  • 相关阅读:
    linux上安装vsftpd
    springboot集成mybatisplus
    springboot集成swagger2
    ssm+maven多模块项目整合
    追梦强人工智能(一)
    Linux环境kafka安装
    Linux环境安装jdk10
    东芝笔记本Satellite M40-A
    Maven简介
    postgresql PL/pgSQL—存储过程结构和变量声明
  • 原文地址:https://www.cnblogs.com/ruiyeclub/p/12942572.html
Copyright © 2011-2022 走看看