当前位置: 代码迷 >> 综合 >> Response 设置返回内容为JSON和编码格式UTF-8
  详细解决方案

Response 设置返回内容为JSON和编码格式UTF-8

热度:62   发布时间:2024-01-30 20:58:06.0
response.setContentType("application/json;charset=utf-8")
// 设置状态码
response.setStatus(HttpStatus.FORBIDDEN.value())

 

  相关解决方案