1.
(1)数组的请求方式(post)
(2)数组的请求方式(get)
http://localhost:port/list?ages=10,20,30
后端接收方式:
@PostMapping("/xxx")@ResponseBodypublic Mapxxx(@RequestParam(value = "ages[]") Integer[] ages,@RequestParam String type) { xxxx return map;}
参考链接:https://www.jianshu.com/p/85251b746058
2.jsonObject 的请求方式(data 即为映射的bean属性【
private JSONObject data;
】):
格式如下:
{ "data": { "address": "上海", "contractList": [ { "fileId": "001" } ] }}