js代码
function click(){
var arrays = new Array();
for (var i = 0; i < arr.length; i++) {
arrays.push("123");
}
$.ajax({
type: "post",
url: ,
data: {list:arrays},
dataType: "json",
success: function(data){ }
})
}
Java代码
@PostMapping(value = "/aaa")
@ResponseBody
public String addDynamicStateBase64s(@RequestParam("list[]")List<String> lsit){
return null;
}
接收参数的时候需要带中括号