springblade 3.0.1 启动报错,无法找到knife4j.spring.extension.OpenApiExtensionResolver这个bean

Blade 未结 2 2773
bytelion
bytelion 剑童 2021-02-03 15:35

一、该问题的重现步骤是什么?

1. clone代码到本地之后,运行时报错



二、你期待的结果是什么?实际看到的又是什么?

成功运行,实际看到的是一个依赖无法注入

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

springblade 3.0.1 、mac m1  


基础环境:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)

Maven home: /Users/asesino/workSpace/apache-maven-3.6.3

Java version: 1.8.0_275, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre

Default locale: zh_CN, platform encoding: UTF-8

OS name: "mac os x", version: "11.1", arch: "aarch64", family: "mac"


四、请提供详细的错误堆栈信息,这很重要。


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2021-02-03 15:23:18.772 ERROR 4533 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Parameter 0 of constructor in org.springblade.core.swagger.SwaggerAutoConfiguration required a bean of type 'com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver' that could not be found.



Action:


Consider defining a bean of type 'com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver' in your configuration.


2021-02-03 15:23:19.746  WARN 4533 --- [       Thread-2] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Start destroying common HttpClient

2021-02-03 15:23:19.746  WARN 4533 --- [      Thread-35] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Start destroying Publisher

2021-02-03 15:23:19.747  WARN 4533 --- [      Thread-35] c.a.nacos.common.notify.NotifyCenter     : [NotifyCenter] Destruction of the end

2021-02-03 15:23:19.748  WARN 4533 --- [       Thread-2] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Destruction of the end


Process finished with exit code 1

五、若有更多详细信息,请在下面提供。

2条回答
  • 2021-02-03 20:10

    更新knife4j版本后需要有对应的配置,看下blade.yaml文件,将新的配置复制放到nacos。另外最新版的nacos是2.0.0了也要同步更新一下

    0 讨论(0)
  • 2021-04-16 14:20

    搞定了吗?粘贴了blade.yaml文件一样这个错误

    0 讨论(0)
提交回复