一、@ReqeustBody+String
@ResponseBody
@RequestMapping(value = "tag/del", method = RequestMethod.POST)
public ResultResponse delTag(@RequestBody @Valid String tagIds) {
... ...
}
{
"tagIds":"1,2"
}
这种tagIds为"{"tagIds":"1,2"}",会把整个json串作为tagIds的值
【注】"tagIds":"1,2"
这种json串是不合法的
网友评论