1.configObject = ["Co2:0.867","CountOfMeterPoint:126","DataUploadInterval:600045"];
2. $.ajax({ type: "POST", dataType:"json", data:{config:configObject.join(",")}, url:'<%=basePath%>sysconfig/updateConfigInfo.json', success:function(data) { if(data){ parent.message_box.show('<h4>成功</h4>操作成功!','success'); } } });
3.action接受
@RequestMapping("/updateConfigInfo.json") @ResponseBody public boolean updateConfigData(String[] config) { return this.sysConfigService.updateConfigData(config); }