1.找到你的spring-mvc.xml添加上(图1)
application/json;charset=UTF-8
text/html;charset=UTF-8

2.在web.xml设置编码过滤器(图2)

3.在数据库的url后边加上useUnicode=true&characterEncoding=UTF-8(图3)

1.找到你的spring-mvc.xml添加上(图1)
application/json;charset=UTF-8
text/html;charset=UTF-8
2.在web.xml设置编码过滤器(图2)
3.在数据库的url后边加上useUnicode=true&characterEncoding=UTF-8(图3)
本文标题:MyBatis返回的json数据中文乱码的解决方案
本文链接:https://www.haomeiwen.com/subject/ykwlzxtx.html
网友评论