@RequestMapping(value = "/staff/itinary/{id}", method = RequestMethod.GET) public @ResponseBody ResponseEntity<?> getItinary(@PathVariable("id") long id) { return new ResponseEntity<>(itinaryservice.findItinary(id), HttpStatus.OK); }
// create a guest first // then try // http://localhost:8080/staff/itinary?guestId=1&discount=0&payment=0&paymentDate=2015-11-27 @RequestMapping(value = "/staff/itinary", method = RequestMethod.POST) public @ResponseBody ResponseEntity<?> createItinary(@RequestBody Itinary iti) { // return new ResponseEntity<>(itinaryservice.createItinary(guestId,discont,payment,payDate), // HttpStatus.OK); return new ResponseEntity<>(itinaryservice.createItinary(iti), HttpStatus.OK); }