SpringBoot集成knife4j遇到getPluginFor错误
1、出现org.springframework.plugin.core.PluginRegistry.getPluginFor报错
原因是:org.springframework.plugin.core的版本还过低,与knife4j要求不符导致报错
解决方式有两种:
1、直接提升springboot启动包的版本到2.3.5.RELEASE
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
<relativePath/>
</parent>
2、直接强制提升spring-plugin-core的版本
<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>