Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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