只修改了网关服务 ruoyi-gateway
pom文件修改如下:
错误提示如下:
13:43:12.948 [main] WARN o.s.b.w.r.c.AnnotationConfigReactiveWebServerApplicationContext - [refresh,591] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'swaggerHandler' defined in file [D:\Demo\RuoYi-Cloud-master\ruoyi-gateway\target\classes\com\ruoyi\gateway\handler\SwaggerHandler.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'springfox.documentation.swagger.web.SwaggerResourcesProvider' available: expected single matching bean but found 2: swaggerProvider,inMemorySwaggerResourcesProvider
13:43:12.999 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - [report,40] -
APPLICATION FAILED TO START
Description:
Parameter 0 of constructor in com.ruoyi.gateway.handler.SwaggerHandler required a single bean, but 2 were found:
- swaggerProvider: defined in file [D:\Demo\RuoYi-Cloud-master\ruoyi-gateway\target\classes\com\ruoyi\gateway\config\SwaggerProvider.class]
- inMemorySwaggerResourcesProvider: defined in URL [jar:file:/D:/apache-maven-3.5.0/repostiory_colud/io/springfox/springfox-swagger-common/3.0.0/springfox-swagger-common-3.0.0.jar!/springfox/documentation/swagger/web/InMemorySwaggerResourcesProvider.class]
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @乐乐 to identify the bean that should be consumed