v2.8.0 版本prod环境报knife4j找不到class

Blade 未结 3 3490
421048337
421048337 2021-04-14 14:55

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

1.v2.8.0 版本jar包运行 --spring.profiles.active=prod时,dev环境没有问题

2. 

3.


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


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

v2.8.0 版本

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

INFO: Sentinel log output type is: file

INFO: Sentinel log charset is: utf-8

INFO: Sentinel log base directory is: /root/logs/csp/

INFO: Sentinel log name use pid is: false

2021-04-14 14:50:21.389  INFO 738 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2021-04-14 14:50:21.917  WARN 738 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

2021-04-14 14:50:21.965  INFO 738 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext

2021-04-14 14:50:21.966  INFO 738 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5081 ms

2021-04-14 14:50:22.308  WARN 738 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2021-04-14 14:50:22.308  INFO 738 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2021-04-14 14:50:22.331  INFO 738 --- [           main] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@1fc0053e

2021-04-14 14:50:22.613  INFO 738 --- [           main] o.s.b.a.e.web.ServletEndpointRegistrar   : Registered '/actuator/hystrix.stream' to hystrix.stream-actuator-endpoint

2021-04-14 14:50:22.938  INFO 738 --- [           main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource

2021-04-14 14:50:24.048  INFO 738 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited

2021-04-14 14:50:28.393  WARN 738 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dynamicResponseModelReader' defined in URL [jar:file:/services/blade/jar/blade-system.jar!/BOOT-INF/lib/knife4j-spring-2.0.8.jar!/com/github/xiaoymin/knife4j/spring/plugin/DynamicResponseModelReader.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'springfox.documentation.schema.TypeNameExtractor' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2021-04-14 14:50:28.400  INFO 738 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closing ...

2021-04-14 14:50:28.410  INFO 738 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed

2021-04-14 14:50:28.437  INFO 738 --- [           main] ConditionEvaluationReportLoggingListener : 


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

2021-04-14 14:50:29.106 ERROR 738 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


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

APPLICATION FAILED TO START

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


Description:


Parameter 0 of constructor in com.github.xiaoymin.knife4j.spring.plugin.DynamicResponseModelReader required a bean of type 'springfox.documentation.schema.TypeNameExtractor' that could not be found.



Action:


Consider defining a bean of type 'springfox.documentation.schema.TypeNameExtractor' in your configuration.

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

3条回答
提交回复