vendredi 10 avril 2015

spring pathvariable doesn't work ,can't get the value

when i enter:http://localhost:8080/sys_manager/admin/sys/resource/update/1009 it's can enter into this method,but the id value is null,:



@RequestMapping(value = "update/{id}", method = RequestMethod.GET)
public String showUpdateForm(@PathVariable("id") ID id, Model model) {
M m = baseService.findOne(id);
if (permissionList != null) {
this.permissionList.assertHasUpdatePermission();
}
setCommonData(model);
model.addAttribute(Constants.OP_NAME, "修改");
model.addAttribute("m", m);
return viewName("editForm");
}


One picture more than thousands of words,here is the snapshot:http://ift.tt/1JsCHEr


Aucun commentaire:

Enregistrer un commentaire