Today I play with the Spring MVC framework, using AJAX to call the spring controller and return to the map object, suddenly found, hey, how can only return string in @response, I use the Spring 3 version is not low Ah, baffled its solution, Then go to the official forum to find the reason, good guy, many people have this experience, and seemingly some official staff also can not tell how to solve, others ask questions are shouting to submit the bug (it seems that the official support staff also have slag AH).
So go to Spring-vramework official website to view the document, have the following description
Jackson is supported directly on @ResponseBody and responseentity controllers methods for serializing different amounts of Detail for the same POJO (e.g. summary vs. detail page). This was also supported with view-based rendering by adding the serialization View type as a model attribute under a Specia L
This means that if you use @responsebody, Jackson needs to be quoted.
With this guideline, let's say, I poured into the following two jar package, OK, problem solving, @ResponseBody can finally be returned to the Ajax Map, or List object.
jackson-mapper-asl-1.9.12.jar
jackson-core-asl-1.9.12.jar
Spring @ResponseBody can only return string type data resolution