This is the API portion of the hotel management system. It is a RESTful API that allows hotel staff to:
- Create, Read, Update, and Delete (CRUD) hotel rooms
- Create, Read, Update, and Delete (CRUD) hotel guests
- Java 8 or higher
- Clone the repository
- Open the project in your IDE of choice
- Run the HotelApiApplication class
All endpoints are prefixed with /hotel/api
.
GET /rooms
- Returns a list of all roomsGET /rooms/{id}
- Returns the room with the given idPOST /rooms
- Creates a new roomPUT /rooms/{id}
- Updates the room with the given idDELETE /rooms/{id}
- Deletes the room with the given id
(rooms or room, both do the same thing)
GET /guests
- Returns a list of all guestsGET /guests/{id}
- Returns the guest with the given idPOST /guests
- Creates a new guestPUT /guests/{id}
- Updates the guest with the given idDELETE /guests/{id}
- Deletes the guest with the given id
(guests or guest, both do the same thing)
- Java 8
- Maven
- Spring
- Spring Boot
- Hibernate
- MySQL
- Docker
- docker-compose up