getIdSelections()函数会返回一个map遍历后的封装数组,其中用于传递数组的重要参数 traditional: true,也已经给了。但是后台接受的时候会报空指针
var jobIds =[];
jobIds = getIdSelections();
$.ajax({
url:"${pageContext.request.contextPath}/ht/quartz/pause.html",
data:{"jobIds":jobIds},
dataType:'json',
type:'post',
traditional: true,
success:function(data){
alert("成功");
}
})
/**
* 暂停定时任务
*/
@ResponseBody()
@RequestMapping("/pause.html")
public Object pause(Long[] jobIds){
System.out.println(">>>>>>>>>>>>>>>>>>"+jobIds.toString());
scheduleJobService.pause(jobIds);
return JsonResultUtil.getSuccessJson("成功!");
}
应该怎么接收,大神帮忙指点一下