您的位置:首页 > 编程语言 > Java开发

easyUI 接收springMVC返回乱码问题

2013-08-24 00:50 225 查看
接触springMVC不够深入,乱码困扰我到深夜,特此留下记忆:

@responsebody默认滴是那个什么8859-1滴狗屁编码,需要在配置文件中加入如下代码转换:

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" >

<property name="messageConverters">

<list>

<bean class = "org.springframework.http.converter.StringHttpMessageConverter">

<property name = "supportedMediaTypes">

<list>

<value>text/html;charset=UTF-8</value>

</list>

</property>

</bean>

</list>

</property>

</bean>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: