关于springboot集成swagger3时spring

网友投稿 280 2022-09-28


关于springboot集成swagger3时spring

springboot集成knife4j的时候3.0.2版本出现了以下问题:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

 

    springfox.documentation.schema.plugins.SchemaPluginsManager.viewProvider(SchemaPluginsManager.java:95)

 

The following method did not exist:

 

    org.springframework.plugin.core.PluginRegistry.getPluginFor(Ljava/lang/Object;)Ljava/util/Optional;

 

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

 

 jar:file:/Users/zhangyanping/Documents/software/maven/maven_repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar!/org/springframework/plugin/core/PluginRegistry.class

 

It was loaded from the following location:

    file:/Users/zhangyanping/Documents/software/maven/maven_repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar

 

Action:

 

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

我自己的依赖如下:

com.github.xiaoymin

knife4j-spring-boot-starter

3.0.2

解决办法:将依赖中的spring-plugin-core去除,并添加高版本http://。解决之后依赖如下:

com.github.xiaoymin

knife4j-spring-boot-starter

3.0.2

org.springframework.plugin

spring-plugin-core

org.springframework.plugin

spring-plugin-core

2.0.0.RELEASE

至此,问题就解决了


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:多因素身份认证加固远程桌面RDP端口安全解决方案(rdp远程桌面协议)
下一篇:【网络安全分享】移动互联网所面临的安全威胁有哪些?
相关文章

 发表评论

暂时没有评论,来抢沙发吧~