Springmvc4.0 and above and jackson version problems

When integrating springmvc, there is a problem with returning data in json format, and it is specially recorded for later viewing.

First look at the error:

org.springframework.web.util.NestedServletException:Handler dispatch failed; nested exception is java.lang.NoSuchMethodError

 Generally , json data is returned through @ResponseBody. If you also use the configuration of jackson and springmvc, you need to select the appropriate version. jackson2.7 is not compatible with the latest springmvc4.2.4 official website description:

Work on Jackson 2.7 started in August 2015

 and completed in early January 2016.

 We need to revise our type variable exposure (SPR-13728for proper Jackson 2.7 support in Spring Framework 4.3 

and should also evaluate other changes that are worth adapting to. 

So if you want to execute successfully, you need to select jackson2.6 version to use it correctly with springmvc4.3.0.


In addition, let's talk about the difference between mybatis-3.2.8 and mybatis-3.4.1. For datetime type data, mybatis-3.4.1 version does not need to perform empty string judgment when comparing the size of datetime type data.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326333443&siteId=291194637