今天在在搭建springcloud gateway的时候,启动gateway一直会报错,
错误:
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包冲突,因为gateway用的是webflex,会和web包中有冲突,然而我的父工程中是没有web包的,
然后我将父工程中依赖的包全部去掉,只剩下最boot的包和eureka-client的包,如下图:
结果还是会报错;然后我在gateway的项目中的父依赖修改成springboot的依赖,该工程就自己会好了,如下图:
具体原因还没找,我现在这里记下,过2天来看看