首先是我的環境
2.3.7.RELEASE的springboot springcloud Hoxton.SR9
下面是pom檔案,這個是一個子模塊,所以會集成一些依賴


但是這樣子我想使用RouteLocator來配置路由會出現問題

所有的都很簡單,專案無法啟動,下面是錯誤資訊
Description:
Parameter 0 of method routeLocator in icu.bleuweb.GatewayApplication required a bean of type 'org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'routeLocatorBuilder' in 'GatewayAutoConfiguration' not loaded because @ConditionalOnClass did not find required class 'org.springframework.web.reactive.DispatcherHandler'
請教下到底該怎么辦
uj5u.com熱心網友回復:
需要一個`.RouteLocatorBuilder`類但是沒找到,可能是版本不對。有沖突uj5u.com熱心網友回復:
Hoxton.SR1和boot 2.2.2沒問題,我試試你的版本uj5u.com熱心網友回復:
我知道了,是和 spring-boot-start-web依賴沖突了轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/242977.html
標籤:Java EE
上一篇:AOP增強獲取不到RequestContextHolder物件里面得資訊
下一篇:java內嵌瀏覽器
