@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public String remove(@PathVariable("id") Long id) { RoomType room = new RoomType(); room.setRoomTypeId(id); roomTypeService.delete(room); return "redirect:/room"; }
@RequestMapping(value = "/{id}", method = RequestMethod.POST) public String description(@PathVariable("id") Long id, Model model) { RoomType room = new RoomType(); room.setRoomTypeId(id); room = roomTypeService.get(room); model.addAttribute("room", room); return "editroom"; }