Spring3X升级到Spring4X时,出现的问题
1.1、异常描述
Description Resource Path Location Type
Class 'org.springframework.http.converter.json.MappingJacksonHttpMessageConverter' not found [config set: testweba/web-context] spring-mvc.xml
/testweba/src/main/resources line 13 Spring Beans Problem
1.2、原因分析
Spring3升级到Spring4时, 运行时出现找不到MappingJacksonHttpMessageConverter的情况
原因是Spring 3.x 和4.X处理JSON的一个类不一样,而这个东西又配置在xml文件中,所以编译时又无法发现
1.3 解决办法
spring3.x是org.springframework.http.converter.json.MappingJacksonHttpMessageConverter
spring4.x是org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
- 查找替换所有XML中名字
- 同时加入最新的FastJackson依赖
2.1 异常描述
Description Resource Path Location Type
Build path is incomplete. Cannot find class file for com/fasterxml/jackson/core/JsonGenerator spring-mvc.xml /testweba/src/main/resources line 13 Spring AOP Problem
2.2 原因分析
Spring 4.x 需要依赖的相关FastJackson jar
2.3 解决办法
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.8</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.8</version>
</dependency>
或者直接引入总的依赖包名
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.8.8</version>
</dependency>
Spring3X升级到Spring4X时,出现的问题的更多相关文章
- 关于升级程序版本时version与build修改的问题
CHENYILONG Blog 关于升级程序版本时version与build修改的问题 #问题#从V1.0升级到V1.0.1.version是一定要改的,那么build需要修改吗? #解答#一般习惯上 ...
- windows7系统下升级到IE11时无法使用F12开发人员工具的解决办法
windows7系统下升级到IE11时,发现F12开发人员工具无法使用,打开都是空白的 解决办法,就是下载IE11的补丁,下载地址为:https://www.microsoft.com/zh-CN/d ...
- tomcat6升级到7时400问题,以及url带有汉字时出错。
tomcat6升级到7时400问题: 在文件catalina.properties后加入tomcat.util.http.parser.HttpParser.requestTargetAllow=|. ...
- django升级2.1python升级3.7时出现的错误:"trying to load '%s': %s" % (entry[1], e) django.template.library.InvalidTemplateLibrary:
django升级2.1python升级3.7时出现如下的错误: "trying to load '%s': %s" % (entry[1], e) django.template. ...
- 针对电信乌龙事件的深度测试: 广州电信错误将深圳地区189的号码在3G升级4G申请时从广州网厅发货,造成深圳用户收到4G卡后无法激活,深圳电信找不到订单
广州电信错误将深圳地区189的3G升级4G申请从中国电信广州网厅发货(智能卡号:8986 1114 9002 0851 742X S 电话号码 189),造成用户收到4G卡后无法激活,深圳电信找不 ...
- 升级到tomcat8时Artifact SpringMvcDemo:war exploded: Server is not connected. Deploy is not
The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8 http://segmen ...
- linux升级安装openssh时出现依赖冲突
通过如下方式下载到openssh安装包 https://www.cnblogs.com/qq931399960/p/11120429.html -rwxrwxrwx. root root Jul : ...
- iphone5升级到iOS7时出现“This device isn't eligible for the requested build”错误
因为工作的需要我需要把自己的手机升级到iOS7,安装苹果的升级顺序总是报This device isn't eligible for the requested build错误,搜索相关的文章我的错误 ...
- Vs2010项目升级到Vs2015时的一些修改
之前的C++/cli项目, Civil 3D版本为2014, 现在需要升级到2018版, 在升级的过程中遇到了一些问题: 为了备忘, 记录如下: Vcproj文件中进行了一些修改, 为了跟多版本项目的 ...
随机推荐
- CF1083A The Fair Nut and the Best Path
CF1083A The Fair Nut and the Best Path 先把边权搞成点权(其实也可以不用),那么就是询问树上路径的最大权值. 任意时刻权值非负的限制可以不用管,因为若走路径 \( ...
- keycloak 了解
Keycloak 是一个针对Web应用和 RESTful Web 服务提供 SSO 集成.基于 OAuth 2.0 和 JSON Web Token(JWT) 规范.目前用于实现 JBoss 与 Wi ...
- selectToUISlider
版权声明:本文为LZUGIS原创文章,未经同意不得转载. https://blog.csdn.net/GISShiXiSheng/article/details/24304321 用过google e ...
- 异常处理—Exception(二)
在上一篇中"异常处理--Exception(一)"中,跟大家简单介绍了一下Exception,也使大家充分的了解了Exception管理在一个项目中的重要性,那如何在我们的项目中处 ...
- linux网络设备理解
网络层次 linux网络设备驱动与字符设备和块设备有很大的不同. 1. 字符设备和块设备对应/dev下的一个设备文件.而网络设备不存在这样的设备文件.网络设备使用套接字socket访问,虽然也使用re ...
- CArray,CList,CMap如何实例化
1.定义一个CMap,向这个CMap中增加数据项(键-值对).CMap<CString, LPCTSTR, CString, LPCTSTR>m_ItemMap;CString strKe ...
- SecureCRT上传下载文件教程(Zmodem使用教程)
SecureCRT是一个仿真终端连接工具.它可以方便的连接SSH服务器,远程管理Linux.同时,它还能使用多种协议方便的上传下载文件.其中Zmodem是SecureCRT支持比较好的一种古老的上传下 ...
- golang之交叉编译设置
俺的环境,os x,目的,生成64位linux的elf文件 直接下载osx的包就可以,不需要特意去下载源码包,我的go目录是~/golang/go cd ~/golang/go/srcGOOS=lin ...
- elasticSearch Java Spring Data Api
1. BoolQueryBuilder qb=QueryBuilders. boolQuery(); qb.should(QueryBuilders.matchQuery("keyWord& ...
- 关于FPGA供电
FPGA是一种多电源需求的芯片,主要有3种电源需求: VCCINT:核心工作电压,PCI Express (PCIe) 硬核IP 模块和收发器物理编码子层(PCS) 电源.一般电压都很低,目前常用的F ...