spring 3 mvc 的 @ResponseBody返回数据中文乱码

<bean  
    class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  
    <property name="messageConverters">  
        <list>  
            <bean  
                class="org.springframework.http.converter.StringHttpMessageConverter">  
                <property name="supportedMediaTypes">  
                    <list>  
                        <bean class="org.springframework.http.MediaType">  
                            <constructor-arg index="0" value="text" />  
                            <constructor-arg index="1" value="plain" />  
                            <constructor-arg index="2" value="UTF-8" />  
                        </bean>  
                    </list>  
                </property>  
            </bean>  
        </list>  
    </property>  
</bean> 

 

posted on 2015-07-15 18:17  lvlv岁月流逝  阅读(250)  评论(0编辑  收藏  举报

导航