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. Problem analysis

  • Error reported:

    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)}
    
    
  • When using Spring Cloud for microservices and distributed development, the gateway is the first entry point for requests, so the permission verification requested by the client is generally placed on the gateway for authentication and authentication. Because Spring Cloud Gateway is developed based on WebFlux and Netty, it is different from the traditional Servlet method. Moreover, the gateway generally does not directly request the database and does not provide user management services, so it cannot directly use web services.

  • Official website description:Insert image description here

2. Solve

Remove dependencies

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

Guess you like

Origin blog.csdn.net/qq_45372719/article/details/111747573