2019.1.21
postman调试接口 报错
{
"timestamp": 1548037338810,
"status": 415,
"error": "Unsupported Media Type",
"exception": "org.springframework.web.HttpMediaTypeNotSupportedException",
"message": "Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported",
"path": "/testRedis2s"
}
json格式错误 解决。
list<bean>+mysql存储方式 利用fastjson解决
list<bean> 接收
@ApiModelProperty("id")
private int id;
@ApiModelProperty("订单号")
private String orderNo;
@ApiModelProperty("成绩 String:"+"no,cupNumber,endTime")
private List<RaceEndGradeVo> grade;
JSONObject.toJSONString(raceGameEndVo.getGrade());接受时list<bean>转成string
JSONObject.parseArray(racePropOrderDetailVo.getGrade());string转成arrayList