自定义的返回结构体:
public class JsonResult<T> {
private int code;
private String message;
private T data;
}
之前使用 Springboot 2.1.4,接口返回的格式为
{
"code": 200,
"message": "操作成功",
"data": null
}
最近考虑升级下版本,测试 Springboot 2.4.1,返回格式为:
[
"com.xxx.support.JsonResult",
{
"code": 200,
"message": "操作成功",
"data": [
"java.util.ArrayList",
[]
]
}
]
是要修改什么配置吗?看 release note 也没看到有相关的说明。