springboot版本由2.6.0改为2.8.0之后,启动提示如下错误

Blade 已结 1 1401
ywlong
ywlong 剑圣 2021-05-07 14:28

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

1. springboot版本由2.6.0改为2.8.0之后,启动提示如下错误。

2. 

3.


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


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


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

2021-05-07 14:25:15.703  WARN 12332 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springblade.common.config.SwaggerConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springblade.core.swagger.SwaggerAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2021-05-07 14:25:15.707  INFO 12332 --- [           main] o.f.j.s.i.a.AbstractAsyncExecutor        : Shutting down the async job executor [org.flowable.spring.job.service.SpringAsyncExecutor].

2021-05-07 14:25:15.707  INFO 12332 --- [uire-async-jobs] o.f.j.s.i.a.AcquireAsyncJobsDueRunnable  : stopped async job due acquisition for engine cmmn

2021-05-07 14:25:15.707  INFO 12332 --- [uire-timer-jobs] o.f.j.s.i.a.AcquireTimerJobsRunnable     : stopped async job due acquisition

2021-05-07 14:25:15.707  INFO 12332 --- [et-expired-jobs] o.f.j.s.i.a.ResetExpiredJobsRunnable     : stopped resetting expired jobs for engine cmmn

2021-05-07 14:25:15.734  INFO 12332 --- [           main] o.f.j.s.i.a.AbstractAsyncExecutor        : Shutting down the async job executor [org.flowable.spring.job.service.SpringAsyncExecutor].

2021-05-07 14:25:15.734  INFO 12332 --- [uire-timer-jobs] o.f.j.s.i.a.AcquireTimerJobsRunnable     : stopped async job due acquisition

2021-05-07 14:25:15.734  INFO 12332 --- [et-expired-jobs] o.f.j.s.i.a.ResetExpiredJobsRunnable     : stopped resetting expired jobs for engine bpmn

2021-05-07 14:25:15.734  INFO 12332 --- [uire-async-jobs] o.f.j.s.i.a.AcquireAsyncJobsDueRunnable  : stopped async job due acquisition for engine bpmn

2021-05-07 14:25:15.847  INFO 12332 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

2021-05-07 14:25:15.854  INFO 12332 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closing ...

2021-05-07 14:25:15.869  INFO 12332 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed

2021-05-07 14:25:15.887  INFO 12332 --- [           main] ConditionEvaluationReportLoggingListener : 


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

2021-05-07 14:25:16.087 ERROR 12332 --- [           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.


The following candidates were found but could not be injected:

- Bean method 'markdownResolver' in 'Knife4jAutoConfiguration' not loaded because @ConditionalOnProperty (knife4j.enable=true) did not find property 'knife4j.enable'



Action:


Consider revisiting the entries above or defining a bean of type 'com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver' in your configuration.



Process finished with exit code 1


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

1条回答
  •  zhx1994
    zhx1994 (最佳回答者)
    2021-05-07 15:06

    检查下knife4j的配置有没有更新全

    1 讨论(2)
提交回复