コード例 #1
0
 @RequestMapping(value = "/{id}", produces = "text/html")
 public String show(@PathVariable("id") String id, Model uiModel) {
   User user = userService.selectByPrimaryKey(id);
   uiModel.addAttribute("user", user);
   uiModel.addAttribute("itemId", id);
   return "view/user/user_show";
 }
コード例 #2
0
 @RequestMapping(value = "/edit/{id}")
 public String updateForm(@PathVariable("id") String id, Model uiModel) {
   User user = userService.selectByPrimaryKey(id);
   populateEditForm(uiModel, user);
   return "view/user/user_update";
 }