controller代码
/pause是节点,前台需要调用并传给controller的ID;使用post方法
@RequestMapping(value="/pause", method=RequestMethod.POST)
public Model modelPauseAction(@RequestParam String ID){
Model model = new Model();
String result = TaskService.pauseTask(ID);//从server获取的结果数据
return model; //model将带数据返回给前台
}