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