org.springframework.http.converter.json.MappingJacksonHttpMessageConverter


##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 解決辦法 com.fasterxml.jackson.core jackson-core 2.8.5 com.fasterxml.jackson.core jackson-databind 2.8.5 com.fasterxml.jackson.core jackson-annotations 2.8.5 '''

http://www.cnblogs.com/chry/p/6283483.html http://www.sojson.com/blog/145.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM