A fully functional API that control order with the association with order items and clients. Made using:
- Java 11
- Maven
- JUnit
- Spring Boot
- Spring Data Jpa
- Docker and Docker-compose
- PostgreSQL
- Lombok
- Swagger Documentation
How to structure a Spring Boot Java application using best practices and SOLID principles, using dependencies from Maven like Lombok to save time and create more readable and easy to maintain code. I also learn got a better understanding of associations (One to Many, Many to One, etc) using annotations. I've also have learned the importance of DTO and Service classes. Update: Returning to the project a few months later I'm now implementing tests and improving the overall architecture.
You can access after the project is running in the /swagger-ui.html endpoint.
You can use an API Test application, Postman or Insomnia, to test the endpoints you'll clone the project to your machine and run, you'll need Java 11 and Maven 3.8.1. The commands to clone and to run are the following:
Clone:
git clone https://github.com/Vinicius-92/order-api.git
Create docker database: In order to create and use the database, you'll need Docker and docker compose installed on your machine, if that is the case you can enter the docker directory and run the command bellow.
docker compose up -d
This command will automatically build de image for the postgres database, create the database and add a few resources for you to test the endpoints.
Run: (in the root of project directory)
mvn spring-boot:run
Added Swagger Documentation-> DoneSeparate the class repository to delegate the responsibility for the service class-> DoneCreate a DTO object in order to improve how the responses from endpoints can be more efficient-> DoneCreate a database to test application's endpoints-> DoneCreate personalized exceptions-> DoneAdd a docker and docker compose file to automatically create the database-> Done