steps to run the application :
- mvn clean install
- nohup java -jar target/hotelbookingservice.jar &
- Application base url : http://localhost:8088/hotelbookingservice
- Swagger url : http://localhost:8088/hotelbookingservice/swagger-ui.html . Please use swagger to test the APIS.
consists of 2 controllers :
- room-type-controller
- booking-controller
room-type-controller 2 Apis : I) GET /room/types : lists the roomtypes in the hotel along with their information. II) GET /room/{type} : lists the information about a particular roomtype in a hotel.
booking-controller 2 Apis I)POST /booking/select/room : request made to select a particular room from given checkin to checkout date before its booking done . So here a count is maintained which is incremneted each time a user selects a room from checin to checkout . Note : USer will only be able to select a room , if it is available and if it isnt blocked by any other user. II)POST /booking/makeBooking : This request creates a booking in the backend and after successful creation decrements the count which is incremented in the /booking/select/room request.