'org.springframework.http.codec.
2021-03-02 本文已影响0人
索性流年
完整报错
Description:
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.
Action:
Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' in your configuration.
Disconnected from the target VM, address: '127.0.0.1:60306', transport: 'socket'
Process finished with exit code 1
错误原因
- Gateway 网关中默认 引入了 spring-boot-starter-webflux,而不是spring-boot-starter-webflux 与 spring-boot-starter-web 是冲突的
解决办法
- 将spring-boot-starter-web依赖在网关项目中排除即可