启动springboot时报错 APPLICATION FAILED TO START 包冲突

启动springboot时报错 APPLICATION FAILED TO START 包冲突

problem

具体日志如下

***************************
APPLICATION FAILED TO START
***************************Description:An attempt was made to call a method that does not exist. The attempt was made from the following location:org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:823)The following method did not exist:com.fasterxml.jackson.databind.Module.getTypeId()Ljava/lang/Object;The calling method's class, org.springframework.http.converter.json.Jackson2ObjectMapperBuilder, was loaded from the following location:jar:file:/Users/dream/.m2/repository/org/springframework/spring-web/5.3.13/spring-web-5.3.13.jar!/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.classThe called method's class, com.fasterxml.jackson.databind.Module, is available from the following locations:jar:file:/Users/dream/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar!/com/fasterxml/jackson/databind/Module.classThe called method's class hierarchy was loaded from the following locations:com.fasterxml.jackson.databind.Module: file:/Users/dream/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jarAction:Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.http.converter.json.Jackson2ObjectMapperBuilder and com.fasterxml.jackson.databind.ModuleProcess finished with exit code 1

reason

报错日志的意思

  • com.fasterxml.jackson.databind.Module.getTypeId 这个方法不存在
  • 此方法对应的一个类 json.Jackson2ObjectMapperBuilder 来自 spring-web-5.3.13.jar 包
  • 此方法对应的另一个类 jackson.databind.Module 来自 jackson-databind-2.3.3.jar

观察maven依赖

  • 正常项目的依赖是 spring-web-5.3.13.jar 和 jackson-databind-2.13.0.jar
  • 异常项目的依赖是 spring-web-5.3.13.jar 和 jackson-databind-2.3.3.jar
  • 可以看到是 第二个包的版本低了,导致出现了包冲突

对比pom文件

  • 对比正常和异常项目,发现正常项目 springboot 依赖是来自parent节点
  • 异常项目 springboot 依赖是pom中 自定义

Snipaste_2023-12-29_15-23-11

solution

采用parent方式引入springboot可以解决问题

Snipaste_2023-12-29_15-34-46

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/309138.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

轮滑培训机构会员系统,轮滑俱乐部会员卡管理软件教程

轮滑培训机构会员系统,轮滑俱乐部会员卡管理软件教程 一、软件程序问答 1、轮滑会员管理,那么会员卡是否可以直接用手机号呢? 如下图,软件以 佳易王轮滑会员管理系统V16.2为例说明 会员在登记的时候,会员卡可以直…

多家快递批量混合跟踪——跟踪物流必备份神器

先来跟大家说下我目前需要跟踪邮政、顺丰、德绑这三家快递,很朋友给建议是分开查询 ,一家一家到快递官网上查询, 这个一种查询方法,这个虽然费时间,效率不高适合查询量少的情况,量多的情况下这样查起来太麻…

轻松实现iphone截图传电脑

目录 摘要 引言 用户登录工具和连接设备 生成截图 摘要 本篇博文介绍了克魔助手这款工具,解决了iPhone与Windows系统下图片传输的烦恼。通过连接同一Wi-Fi,使用克魔助手轻松实现了iPhone截图传输到电脑上的便捷操作。用户只需简单地下载并安装克魔助…

Ubuntu20.04 上启用 VCAN 用作本地调试

目录 一、启用本机的 VCAN​ 编辑 1.1 加载本机的 vcan 1.2 添加本机的 vcan0 1.3 查看添加的 vcan0 1.4 开启本机的 vcan0 1.5 关闭本机的 vcan0 1.6 删除本机的 vcan0 二、测试本机的 VCAN 2.1 CAN 发送数据 代码 2.2 CAN 接收数据 代码 2.3 CMakeLists.…

【AI导师】利用Coding Agent完成AIGC编程

利用Coding Agent完成AIGC编程 一、前言二、Coding Agent三、1024code四、AI导师README项目初版功能定义代码结构设计方案函数方法设计方案迭代记录 一、前言 AI产品的发展确实在过去两年年中取得了显著进展,尤其是在编程领域。一开始,ChatGPT和类似的语…

【三维目标检测/自动驾驶】IA-BEV:基于结构先验和自增强学习的实例感知三维目标检测(AAAI 2024)

系列文章目录 论文:Instance-aware Multi-Camera 3D Object Detection with Structural Priors Mining and Self-Boosting Learning 地址:https://arxiv.org/pdf/2312.08004.pdf 来源:复旦大学 英特尔Shanghai Key Lab /美团 文章目录 系列文…

lag-llama源码解读(Lag-Llama: Towards Foundation Models for Time Series Forecasting)

Lag-Llama: Towards Foundation Models for Time Series Forecasting 文章内容: 时间序列预测任务,单变量预测单变量,基于Llama大模型,在zero-shot场景下模型表现优异。创新点,引入滞后特征作为协变量来进行预测。 获得…

偏好对齐RLHF-OpenAI·DeepMind·Anthropic对比分析

OpenAI paper: InstructGPT, Training language models to follow instructions with human feedback paper: Learning to summarize from human feedback Introducing ChatGPT 解密Prompt系列4介绍了InstructGPT指令微调的部分,这里只看偏好对齐的部分 样本构建…

Large-Precision Sign using PBS

参考文献: [CLOT21] Chillotti I, Ligier D, Orfila J B, et al. Improved programmable bootstrapping with larger precision and efficient arithmetic circuits for TFHE[C]//Advances in Cryptology–ASIACRYPT 2021: 27th International Conference on the T…

const变量真的不能修改吗?

文章目录 1 在Linux系统下1.1 系统参数1.2 通过指针修改(编译器有警告) 2 在Windows下2.1 系统参数2.2 直接修改2.3 指针间接修改2.4 指针间间接修改 3 总结: 1 在Linux系统下 1.1 系统参数 内核:Linux version 3.2.0-24-generi…

【软件工程】漫谈增量过程模型:软件开发的逐步之道

🍎个人博客:个人主页 🏆个人专栏: 软件工程 ⛳️ 功不唐捐,玉汝于成 目录 前言: 正文 增量过程模型(Incremental Process Model) 主要特点和阶段: 优点&#xff1…

模板 BIEE(二):Web日志从分析出发,在web页查看取数的sql方法

1 说明 1.1 环境 BIEE: Oracle Business Intelligence Enterprise Edition(Oracle商业智能企业版) 版本: OBIEE 12c Server 版本: 基于Oracle Analytics Server 6.4.0 版本 模板: 制造→生产成本→按前 10 个 GL 帐户列出的生产成本 1.2 背景 由《模板 BIEE (一):…