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文件中进行了一些修改, 为了跟多版本项目的 ...
随机推荐
- 【测试工具】tcpdump + wireshark 抓包实践
Tcpdump + Wireshark 抓包实践 工具介绍 Tcpdump 看到dump大家应该有所意识吧,就是下载数据,抓数据.tcpdump是linux下的一个抓取tcp包的命令 Usage: t ...
- appium-java,同时连接多台机器,启动微信
1.配置appium信息 第一台机 第二台机类似,连接端口和监听端口不能重复 2.appium连接手机,微信中打开debugx5.qq.com,信息->TBS settings->是否打开 ...
- Excel VBA to Interact with Other Applications
转载自:https://analysistabs.com/excel-vba/interact-with-other-applications/ Interact with PowerPoint fr ...
- 使用stsadm.exe工具实现SharePoint网站备份还原
一.过程描述: 首先在源站点机器上用stsadm.exe备份网站集,讲备份文件拷贝到目标服务器(也可直接在备份时配置备份路径为目标机器路径),然后执行还原操作:首先新建网站集,然后用SharePoin ...
- python笔记-8(logging模块、re模块、栈与队列)
一.Logging模块日志 1.logging导入 Import logging 2.知道5个日志级别的等级关系 Debug->info->warning->error->cr ...
- Oracle中Inner join和Where的区别
1 .Where子句中使用的连接语句,在数据库语言中,被称为隐性连接.Inner join--on子句产生的连接称为显性连接.(其他Join参数也是显性连接)Where 和Inner join产生的连 ...
- 《DSP using MATLAB》示例Example 8.16
%% ------------------------------------------------------------------------ %% Output Info about thi ...
- LeetCode String Compression
原题链接在这里:https://leetcode.com/problems/string-compression/description/ 题目: Given an array of characte ...
- Python: 为对象动态添加函数,且函数定义来自一个str
转自:http://blog.sina.com.cn/s/blog_55a11f330100ab1x.html 在Python中,通常情况下,你只能为对象添加一个已经写好的方法 需求:传入一个str类 ...
- python一些内建函数(map,zip,filter,reduce,yield等)
python一些内建函数(map,zip,filter,reduce,yield等) map函数 Python实际上提供了一个内置的工具,map函数.这个函数的主要功能是对一个序列对象中的每一个元素应 ...