Skip to content

Instantly share code, notes, and snippets.

@dhaval201279
Last active March 11, 2018 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaval201279/2cdc799ae27331db194f86df7813584f to your computer and use it in GitHub Desktop.
Save dhaval201279/2cdc799ae27331db194f86df7813584f to your computer and use it in GitHub Desktop.
2nd Version of ReservationController
@RestController
@RequestMapping("/reservation")
public class ReservationController {
private ReservationService reservationService;
public ReservationController(ReservationService reservationService) {
this.reservationService = reservationService;
}
@RequestMapping(method = RequestMethod.GET, value = "/{name}")
private Reservation getReservation(@PathVariable String name) {
return reservationService.getReservationDetails(name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment