spring-plugin异常的解决办法

236 字
1 分钟
spring-plugin异常的解决办法

在学习ES的过程中,本着有最新就用最新的想法,使用了springboot2.3.x的版本,在实操过程中遇到了配置和方法过时的情况,于是将springboot版本降级为2.1.13,诡异的事情发生了,原本能正常启动的项目起不来了,报错如下:

*************************** APPLICATION FAILED TO START
*************************** Description: 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:/D:/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:/D:/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.springframework.plugin.core.PluginRegistry

百度了一下问题,遇到了类似问题的帖子,就试了试

一开始使用了1.2.0的版本,但是问题依旧存在,又把帖子往下划拉了划拉,试了试2.0.0版本的,嘿,还真好使了

问题原因:版本冲突

<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-metadata</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>

参考:https://ask.csdn.net/questions/754747

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

spring-plugin异常的解决办法
https://tianch.com.cn/posts/tutorials/spring-plugin-yi-chang-de-jie-jue-ban-fa/
作者
田小晖
发布于
2021-02-20
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
田小晖
记录技术成长,分享运维与开发经验。
公告
分类
标签
站点统计
文章
134
分类
9
标签
29
总字数
203,962
运行时长
0
最后活动
0 天前
站点信息
构建平台
Cloudflare Pages
博客版本
Firefly v6.15.6
文章许可
CC BY-NC-SA 4.0

当前页面没有目录