var data={};
for (var i = 0; i < 3; i++) {
data['studentList[' + i +'].name']="A"+i;
data['studentList[' + i +'].age']=i;
}
$.ajax({
url: "./save",
cache: false,
type:'post',
data:data,
success: function (result) {
if (checkResult(result)) {
swal("", "操作成功!", "success");
}
}
});
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ResponseBody
public AjaxResult save(List<Student> studentList) {
return new AjaxResult();
}