一.SpringMVC 使用 ModelAndView 来处理返回值问题. 1.ModelAndView 官方描述: Holder for both Model and View in the web MVC framework.Note that these are entirely distinct. This class merely holdsboth to make it possible for a controller to return both modeland view in
SpringMVC的@ResponseBody返回中文乱码的原因是SpringMVC默认处理的字符集是ISO-8859-1, 在Spring的org.springframework.http.converter.StringHttpMessageConverter类中可以看到如下代码: public static final Charset DEFAULT_CHARSET = Charset.forName("ISO-8859-1"); 解决返回中文乱码的问题有两种,第一种是局部的,只