美文网首页
'org.springframework.http.codec.

'org.springframework.http.codec.

作者: 索性流年 | 来源:发表于2021-03-02 13:34 被阅读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依赖在网关项目中排除即可

相关文章

网友评论

      本文标题:'org.springframework.http.codec.

      本文链接:https://www.haomeiwen.com/subject/gpwafltx.html