gateway閘道器報錯No qualifying bean of type ‘org.springframework.core.convert.ConversionService‘ available
阿新 • • 發佈:2020-12-27
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
-
在使用Spring Cloud 進行微服務,分散式開發時,閘道器是請求的第一入口,所以一般把客戶端請求的許可權驗證統一放在閘道器進行認證與鑑權。因為Spring Cloud Gateway使用是基於WebFlux與Netty開發的,所以與傳統的Servlet方式不同。而且閘道器一般不會直接請求資料庫,不提供使用者管理服務,所以不能直接使用web服務。
-
官網說明:
2、解決
刪除依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>