songxingzhu

一、问题

  新建的基于SpringBoot的MVC项目,在请响应体中,如果有中文,会显示为乱码。

 

二、解决方案

1、在application.properties中设置:

spring.http.encoding.force=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.tomcat.uri-encoding=UTF-8

 

分类:

技术点:

相关文章:

  • 2021-12-25
  • 2022-03-09
  • 2021-10-20
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2022-03-10
  • 2022-12-23
  • 2021-06-18
  • 2021-10-30
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案