This is a Spring Boot application responsible for control of Cars availables to rent. Exposed API manages configuration and register Cars and Makes.
- Java 11
- Spring MVC
- Spring Data JPA
- Spring Security
- Log4j
- Swagger2
- PostgreSql
- Lombok
- Git
- JDK 11 or later
- Maven 3.x.x
To get started you can simply clone this repository using git:
git clone https://github.com/o2junior/rentacar-api.git
The application is with defaults values to use the database postgresql present on docker folder,
but, if you wants up de application connected to another database, use the environment variables:
- DB_HOST
- DB_PORT
- DB_NAME
- DB_USERNAME
- DB_PASSWORD
To run the unit tests use the following command on terminal at the root project folder:
mvn clean test
To up the application on a local environment we have a containerized Postgresql database, to up then we can use the docker-compose or just run the following shell script.
./run-docker.sh
You can run the application from the command line as follows:
mvn spring-boot:run
You can check if the application is running by hitting: http://localhost:8080/health
You can check the specification of the API on: http://localhost:8080/swagger-ui.html
- Add Health check endpoint.
- Add Listener to receive Cars and persist into database.
- Add more Unit Tests
- Adapters
- Repositories
- Security classes
- Utils
- Add Integration Tests
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Data JDBC
- Spring Web
The following guides illustrate how to use some features concretely: