Project created used spring boot to simulate a hotel booking API.
- Java 17;
- Maven as the build tool;
- Lombok to avoid the needed java boilerplate;
- Spring Doc OpenAPI to make it easier to view and try out the http endpoints.
- Spring MVC to handle http requests;
- Spring Data JPA to handle database interactions;
- Bean Validation to validate incoming requests payload;
- JUnit, Mockito and AssertJ for unit testing;
- MySQL as the database engine.
Have a running instance of a MySQL 8 database.
Set the following environment varibles:
- DATABASE_HOST - the database host (e.g. localhost);
- DATABASE_PORT - the database port (e.g. 3306);
- DATABASE_SCHEMA - the database schema (e.g. cancundb);
- DATABASE_USER - the database connection user;
- DATABASE_PASSWORD - the database connection password.
Either start the application with a IDE of choice or package it with mvn clean package and start the generated .jar executable with java -jar <app_name>.jar.
The application will be initialized with a default user and room as defined in src/main/resources/data.sql.