admin管理员组文章数量:1794759
【微服务】 网关启动报错 Consider defining a bean of type org.springframework.http.codec.ServerCodecConfigurer
一、现象
微服务启动时报错:Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer'
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-06-11 14:21:30.165 ERROR 22456 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** 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.二、原因
这是由于所依赖的模块中有 spring-boot-starter-web 的依赖,而 SpringCloudGateway 还不支持 spring-boot-starter-web
三、解决方案
将这个依赖排除
版权声明:本文标题:【微服务】 网关启动报错 Consider defining a bean of type org.springframework.http.codec.ServerCodecConfigurer 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686552406a81038.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论