问题:新建的基于SpringBoot的MVC项目,在请响应体中,如果有中文,会显示为乱码。
解决方案:在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://www.cnblogs.com/songxingzhu/p/11429215.html