Last active
March 11, 2018 02:37
-
-
Save dhaval201279/2cdc799ae27331db194f86df7813584f to your computer and use it in GitHub Desktop.
2nd Version of ReservationController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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