示例#1
0
 @RequestMapping(value = "/delete/{userid}", method = RequestMethod.DELETE)
 public String deleteUserViaREST(@PathVariable Integer userid) {
   userService.deleteUser(userService.getUserById(userid));
   return "redirect:/user";
 }
示例#2
0
 @RequestMapping(value = "/delete", method = RequestMethod.GET)
 public String deleteUser(@RequestParam("userId") Integer userid) {
   userService.deleteUser(userService.getUserById(userid));
   return "redirect:/user";
 }