本文主要是介绍Spring - springfox-spi knife4j 版本冲突解决方案,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题描述
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.github.xiaoymin.knife4j.spring.plugin.OperationDynamicResponseModelProvider.apply(OperationDynamicResponseModelProvider.java:47)
The following method did not exist:
springfox.documentation.spi.service.contexts.RequestMappingContext.findAnnotation(Ljava/lang/Class;)Ljava/util/Optional;
The method’s class, springfox.documentation.spi.service.contexts.RequestMappingContext, is available from the following locations:
jar:file:/D:/repository/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar!/springfox/documentation/spi/service/contexts/RequestMappingContext.class
It was loaded from the following location:
file:/D:/repository/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar
原因分析
knife4j 的版本和 springfox 的版本冲突了:
- springfox-spi:2.9.2
- knife4j:2.0.7
解决方案
将 knife4j 的版本调低一点就好了,改成 2.0.5 问题解决~
这篇关于Spring - springfox-spi knife4j 版本冲突解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!