网关项目启动报错内容如下:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
#[wwf.log]# 2022-09-21 10:47:09.186 ERROR [main] org.springframework.boot.diagnostics.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.Process finished with exit code 1
  • 主要原因其实就是在我把公共包core放在了gateway中,导致启动出现问题,经排查发现是spring-cloud-starter-gatewayspring-boot-starter-web之间的冲突
  • 发现根本原因后就好说了,直接排除Core包中的spring-boot-starter-web就可以了这里请注意的是不是让你去修改core包中的pom文件,是修改gateway项目中的pom文件进行排除。具体代码如下:
     <!--公共资源包--><dependency><groupId>com.wwf</groupId><artifactId>common-core</artifactId><version>1.0-SNAPSHOT</version><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></exclusion></exclusions></dependency>

至此问题解决!!

Spring Cloud/Boot启动报错Consider defining a bean of type ServerCodecConfigurer相关推荐

  1. SpringCloud - 整合Nacos启动报错Consider defining a bean of type IClientConfig

    SpringCloud - 整合Nacos启动报错Consider defining a bean of type IClientConfig 前言 一. 尝试解决Bug的几种不合适方案 1.1 添加 ...

  2. 解决启动报错Consider defining a bean of type ‘xxx‘ in your configuration.

    解决启动报错Consider defining a bean of type 'xxx' in your configuration. 报错截图 解决方法:查看注解是否同时存在@AllArgsCons ...

  3. spring boot 启动报错:No qualifying bean of type org.springframework.security.oauth2.provider.token.Toke

    spring boot启动报错: Exception encountered during context initialization - cancelling refresh attempt: o ...

  4. SpringBoot启动报错Consider defining a bean of type ‘com.test.springmvc.dao.xx‘ in your configuration.

    报错信息如下: Description:Field userDao in com.test.springmvc.service.impl.UserServiceImpl required a bean ...

  5. springboot启动报错: Consider defining a bean of type ‘XXX‘ in your configuration

    Consider defining a bean of type 'XXX' in your configuration 出现这个错误,要看看你是否用到了某些组件,但是启动类上没加相应的注解.比如说我 ...

  6. 【微服务】 网关启动报错 Consider defining a bean of type org.springframework.http.codec.ServerCodecConfigurer

    一.现象 微服务启动时报错:Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer ...

  7. springboot 启动报错:required a bean of type 'xxxRepository' that could not be found

    springboot启动的时候报错,错误如下: Field demoRepository in com.ge.serviceImpl.DemoServiceImpl required a bean o ...

  8. 项目启动报错:No qualifying bean of type ‘xxx‘ available:

    项目启动报错: Description: A component required a bean of type 'cn.hsa.its.abutment.bo.BusinessAcceptBo' t ...

  9. 学习记录报错Consider defining a bean of type ‘org.springframework.web.client.RestTemplate‘ in your configu

    springboot启动就报错 信息如下 Field restTemplate in com.atguigu.springcloud.controller.OrderController requir ...

最新文章

  1. C++知识点11——this指针,const成员函数,访问权限控制
  2. 小看--发布-订阅(观察者)模式
  3. 【渝粤教育】国家开放大学2018年春季 0089-22DInternet和Intranet应用 参考试题
  4. Matlab将一矩阵中等于某个值的元素全部替换成另一个值
  5. 客座编辑:武永卫,男,博士,清华大学计算机科学与技术系教授。
  6. Java 命令行运行参数大全
  7. 公有云、私有云、混合云的区别比较
  8. 64bit 用户空间内核空间
  9. 获取文件夹下所有视频
  10. 七人表决器VHDL语言
  11. 【老骥伏枥-狗年大礼包】嵌入式linux逆向工程,手把手教你作黑Q-第二讲
  12. 手机1像素线粗_移动端1像素边框问题
  13. jmeter 接口测试 签名_JMeter处理接口签名(sign)
  14. 基于Java+Swing实现记事本-完美版
  15. 万字长文的Git使用教程:最详细、最傻瓜、最浅显、真正手把手教!
  16. 一文读懂SpringCloud全家桶
  17. Typora极简教程
  18. 计算机系大一认识实习报告,大一计算机实习报告范文
  19. freemarker/ftl模板/导出doc 单元格合并注意事项
  20. OpenGL.ES在Android上的简单实践:11-全景(索引-深度测试)

热门文章

  1. 上海黑马java9期就业_传智黑马JavaEE基础班+就业班完整版(2018最新 IDEA+JDK9)
  2. 浏览器解析json报 SyntaxError: Unexpected token { 错误 迅雷插件导致js获取后端返回结果报错
  3. 复数域内的微分解法(温度扩散模型)
  4. postgresql 系统表
  5. 大学生毕业摆地摊月入两万的真实经历
  6. 高通导航器软件开发包使用指南(17)
  7. java disruptor 例子_Disruptor应用实例
  8. JAVA学习 API_day02(正则表达式, StringBuider, 包装类, Collection集合类接口)
  9. commom_lang源码笔记(总结)
  10. 软件本地化测试项目案例研究