码迷,mamicode.com
首页 > 编程语言 > 详细

spring ajax以及页面返回中文乱码问题解决

时间:2018-07-06 17:50:47      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:返回   charset   types   tpm   register   highlight   not   prope   efault   

在spring配置文件中添加

<!--返回中文乱码-->
    <mvc:annotation-driven >
        <!-- 消息转换器 -->
        <mvc:message-converters register-defaults="true">
            <bean class="org.springframework.http.converter.StringHttpMessageConverter">
                <property name="supportedMediaTypes" value="text/html;charset=UTF-8"/>
            </bean>
        </mvc:message-converters>
    </mvc:annotation-driven>

  

spring ajax以及页面返回中文乱码问题解决

标签:返回   charset   types   tpm   register   highlight   not   prope   efault   

原文地址:https://www.cnblogs.com/cyrfr/p/9274423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!