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

  1. 查找替换所有XML中名字
  2. 同时加入最新的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时,出现的问题的更多相关文章

  1. 关于升级程序版本时version与build修改的问题

    CHENYILONG Blog 关于升级程序版本时version与build修改的问题 #问题#从V1.0升级到V1.0.1.version是一定要改的,那么build需要修改吗? #解答#一般习惯上 ...

  2. windows7系统下升级到IE11时无法使用F12开发人员工具的解决办法

    windows7系统下升级到IE11时,发现F12开发人员工具无法使用,打开都是空白的 解决办法,就是下载IE11的补丁,下载地址为:https://www.microsoft.com/zh-CN/d ...

  3. tomcat6升级到7时400问题,以及url带有汉字时出错。

    tomcat6升级到7时400问题: 在文件catalina.properties后加入tomcat.util.http.parser.HttpParser.requestTargetAllow=|. ...

  4. 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. ...

  5. 针对电信乌龙事件的深度测试: 广州电信错误将深圳地区189的号码在3G升级4G申请时从广州网厅发货,造成深圳用户收到4G卡后无法激活,深圳电信找不到订单

    广州电信错误将深圳地区189的3G升级4G申请从中国电信广州网厅发货(智能卡号:8986 1114 9002 0851  742X S  电话号码 189),造成用户收到4G卡后无法激活,深圳电信找不 ...

  6. 升级到tomcat8时Artifact SpringMvcDemo:war exploded: Server is not connected. Deploy is not

    The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8 http://segmen ...

  7. linux升级安装openssh时出现依赖冲突

    通过如下方式下载到openssh安装包 https://www.cnblogs.com/qq931399960/p/11120429.html -rwxrwxrwx. root root Jul : ...

  8. iphone5升级到iOS7时出现“This device isn't eligible for the requested build”错误

    因为工作的需要我需要把自己的手机升级到iOS7,安装苹果的升级顺序总是报This device isn't eligible for the requested build错误,搜索相关的文章我的错误 ...

  9. Vs2010项目升级到Vs2015时的一些修改

    之前的C++/cli项目, Civil 3D版本为2014, 现在需要升级到2018版, 在升级的过程中遇到了一些问题: 为了备忘, 记录如下: Vcproj文件中进行了一些修改, 为了跟多版本项目的 ...

随机推荐

  1. 使用django搭建博客并部署

    2017/8/31 18:27:59 为了以后参考的方便,在这里总结一下django搭建博客网站的主要步骤.以下大部分的内容,参考自Django中文文档 - 看云. 需要强调的是,这里使用的djang ...

  2. cannot find lstdc++

    centos下编译grpc-java时遇到的问题,google了一下 : sudo yum install libstdc++-static

  3. window10 下 php7.0 添加Sqlserver扩展

    第一步.7.0.x 7.0.x的扩展下载地址: Microsoft Drivers for PHP for SQL Server  https://www.microsoft.com/en-us/do ...

  4. 《DSP using MATLAB》示例Example 8.24

    代码: %% ------------------------------------------------------------------------ %% Output Info about ...

  5. 《selenium2 python 自动化测试实战》(5)——键盘事件

    键盘事件,就是键盘上的一些操作,比如Ctrl +C,Ctrl+V,Ctrl+X等. 对键盘的操作需要导入另一个键盘的库: from selenium.webdriver.common.keys imp ...

  6. 同一台电脑上装两个或两个以上的tomcat服务器

    1.下载免安装版tomcat,解压成tomcat1.tomcat2: 2.修改tomcat2中conf下server.xml文件如下: <Server port="8005" ...

  7. C#封装的一个JSON操作类

    using System; using System.Collections.Generic; using System.Collections; using System.Text; using S ...

  8. BZOJ4057 [Cerc2012]Kingdoms

    题意 有一些王国陷入了一系列的经济危机.在很多年以前,他们私底下互相借了许多钱.现在,随着他们的负债被揭发,王国的崩溃不可避免地发生了--现在有n个王国,对于每对王国A和B,A欠B的钱被记为d_AB( ...

  9. 【转】HP laserjet p2055dn的自动双面打印功能

    原文网址:http://zhidao.baidu.com/link?url=n_NW7Qfa_7HlrEhLucdvKO43jj3SpFXJhGAfQ-WqF979jm80eUv8s1atqtxE7w ...

  10. linux tcpdump命令抓包

    tcpdump host 210.27.48.1 and \ (210.27.48.2 or 210.27.48.3 \) 截获主机210.27.48.1 和主机210.27.48.2 或210.27 ...