gateway网关报错No qualifying bean of type ‘org.springframework.core.convert.ConversionService‘ available

gateway网关报错No qualifying bean of type ‘org.springframework.core.convert.ConversionService’ available

1、问题分析

  • 报错:

    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.convert.ConversionService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {
          
          @org.springframework.beans.factory.annotation.Qualifier(value=webFluxConversionService)}
    
    
  • 在使用Spring Cloud 进行微服务,分布式开发时,网关是请求的第一入口,所以一般把客户端请求的权限验证统一放在网关进行认证与鉴权。因为Spring Cloud Gateway使用是基于WebFlux与Netty开发的,所以与传统的Servlet方式不同。而且网关一般不会直接请求数据库,不提供用户管理服务,所以不能直接使用web服务。

  • 官网说明:在这里插入图片描述

2、解决

删除依赖

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

猜你喜欢

转载自blog.csdn.net/qq_45372719/article/details/111747573