| 1. 简介主要解决@ResponseBody注解返回的json中文乱码问题。 2.解决方案2.1mvc加上注解(推荐此方法)在mvc配置文件中假如下面配置(写在 <mvc:annotation-driven/>之前才有效)
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" >
    <property name="messageConverters">
        <list>
            <bean class="org.springframework.http.converter.StringHttpMessageConverter">
                <property name="supportedMediaTypes">
                    <list>
                        <value>text/plain;charset=utf-8</value>
                        <value>text/html;charset=UTF-8</value>
                    </list>
                </property>
            </bean>
        </list>
    </property>
</bean>
 2.2 使用@RequestMapping注解的produces方法@RequestMapping(value = "testPersonalValidtor.do",produces = "application/json;charset=utf-8")
 |