gateway替代zuul 遇到的bug:Parameter 0 of method hystrixGatewayFilterFactory in org.springframework.
首先我的依赖是这样的

报错信息是:
Parameter 0 of method hystrixGatewayFilterFactory in org.springframework。。。好一长串
解决方案:
把zuul 依赖去掉即可
再次启动。。。。。。
报错信息:
Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.
解决方案:
把web依赖去掉即可
吐槽:找了好久的度娘。。。。。。。。
本文记录了在使用Spring Cloud Gateway替代Zuul过程中遇到的两个常见问题及解决方案。一是关于hystrixGatewayFilterFactory的参数错误,解决办法是移除zuul依赖;二是关于modifyRequestBodyGatewayFilterFactory找不到ServerCodecConfigurer类型bean的问题,解决办法是移除web依赖。
2770

被折叠的 条评论
为什么被折叠?



