@ResponseBody @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/save", method = RequestMethod.POST) public void save( @RequestBody ReservationTransaction reservationTransaction, HttpServletResponse response) { reservationTransactionDAO.save(reservationTransaction); }
@ResponseBody @RequestMapping(value = "/{id}", method = RequestMethod.PUT) public ReservationTransaction update( @PathVariable int id, @RequestBody ReservationTransaction reservationTransaction) { return reservationTransactionDAO.save(reservationTransaction); }