springboot响应消息(http)的编码设置
2020-12-13 16:09
标签:json oid tpm cat response method pos ext turn 一、方式一 在单个REST接口上设置 二、方式二 全局配置(推荐) springboot响应消息(http)的编码设置 标签:json oid tpm cat response method pos ext turn 原文地址:https://www.cnblogs.com/yoyotl/p/11617727.html @ResponseBody
@RequestMapping(value = "sys/getTree1",method = RequestMethod.POST,produces="application/json;charset=UTF-8")
public String getTree1(){
return "success";
}
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
@Override
protected void configureMessageConverters(List