springboot response返回json对象乱码问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37279783/article/details/88246797
1.tomcat编码

server:
 tomcat:
   uri-encoding: UTF-8

2.http编码

spring:
  http:
    encoding:
      force: true
      charset: utf-8
      enabled: true

3.response返回类型

response.setContentType("text/html;charset=utf-8");

猜你喜欢

转载自blog.csdn.net/qq_37279783/article/details/88246797
今日推荐