springboot中使用servlet时返回结果乱码问题

在总的配置文件:application.properties中做一个配置,把我的问题解决了。

#编码格式
spring.http.encoding.force=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.tomcat.uri-encoding=UTF-8

 

这是我参考一篇文章解决的。

原文地址:https://blog.csdn.net/qq_39654841/article/details/81156695

原文标题:springboot全局字符编码设置(解决乱码问题)

百度关键字:springboot 中文乱码

posted on 2019-06-17 17:52  荆棘人  阅读(179)  评论(0编辑  收藏  举报

导航