当前位置: 首页 > article >正文

瑞吉外卖之com.fasterxml.jackson.dataformat.cbor.CBORFactor相关报错

1.报错:Error creating bean with name 'routerFunctionMapping' defined in class path resource [com/itheima/reggie/config/WebMvcConfig.class]: Failed to instantiate [org.springframework.web.servlet.function.support.RouterFunctionMapping]: Factory method 'routerFunctionMapping' threw exception with message: com/fasterxml/jackson/dataformat/cbor/CBORFactory

2.报错:Failed to instantiate [org.springframework.web.servlet.function.support.RouterFunctionMapping]: Factory method 'routerFunctionMapping' threw exception with message: com/fasterxml/jackson/dataformat/cbor/CBORFactory

3.报错:Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/dataformat/cbor/CBORFactory

4.报错:Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.cbor.CBORFactor

原因:

正确写法:

 MappingJackson2HttpMessageConverter messageConverter = new MappingJackson2HttpMessageConverter();

 错误写法:

 MappingJackson2CborHttpMessageConverter messageConverter = new MappingJackson2CborHttpMessageConverter();


http://www.kler.cn/news/367748.html

相关文章:

  • 嵌入式Linux的AXI平台(platform)驱动教程
  • 深入理解跳出率:如何利用百度统计优化网站用户体验
  • Linux: Shell编程入门
  • Pyspark中pyspark.sql.functions常用方法(4)
  • ThinkPad T480拆机屏幕改装:便携式显示器DIY指南
  • react18中的合成事件与浏览器中的原生事件
  • 计算机前沿技术-人工智能算法-大语言模型-最新研究进展-2024-10-21
  • 基于Kratos+ent+postgreSQL构建简单的CRUDapi
  • 嵌入式软开项目——电子手环开发——学习引导和资料网址
  • 基于R语言机器学习遥感数据处理与模型空间预测技术及实际项目案例分析
  • linux运维100讲练习:第7集
  • 【~/.bashrc】linux系统添加环境变量
  • Linux练习_2账户管理
  • IPV6扩展头部
  • Verilog:参数(parameter)的使用
  • 嵌入式——STM32外设应用
  • 抖音列表页采集-爬虫部分(2)
  • B/S架构的诊所药店云his管理系统源码,云门诊管理系统,自主知识产权,支持二次开发
  • iOS Swift逆向——deMangle过程中的偏移计算
  • 算法|牛客网华为机试10-20C++
  • 学点高数-数学上的集合①-集合的基本概念
  • 学成在线实战
  • 机器学习 - 树结构1 - 随机森林
  • Spring Cloud --- Sentinel 规则持久化
  • YOLO11改进 | 卷积模块 | 卷积模块替换为选择性内核SKConv【附完整代码一键运行】
  • 设计模式概览