版本的問題好坑啊!
在整合springmvc時,要返回json格式的數據出現問題!!!好氣啊
先看下錯誤:
org.springframework.web.util.NestedServletException:Handler dispatch failed; nested exception is java.lang.NoSuchMethodError
一般都是通過 @ResponseBody 返回json數據的。還采用jackson與springmvc的配置話,需要選擇合適的版本。jackson2.7不兼容最新的springmvc4.2.4官網描述:**
Work on Jackson 2.7 started in August 2015 and completed in early January 2016.We need to revise our type variable exposure (SPR-13728) for proper Jackson 2.7 support in Spring Framework 4.3 and should also evaluate other changes that are worth adapting to.
==所以要想執行成功需要選擇jackson2.6版本才能和springmvc4.3.0正確使用。==