springmvc填坑(1)
版本的问题好坑啊!
在整合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正确使用。==
This blog is under a CC BY-NC-SA 3.0 Unported License
本文链接:http://blog.cuteximi.com/springmvc填坑(1)/