Project created to follow DIO bootcamp, this projects uses Spring Boot and unit testing approach to implement an API with Beer Stock CRUD operations and a repository built using H2.
Available OpenAPI Documentation with swagger-ui using springdoc-openai-ui
This project explores several concepts including:
- MVC pattern
- REST API
- H2 Repository
- JPA and Hibernate for DAO
- CRUD operations
- DTO for Data Conversion and Single Responsibility Principle Compliance
- MapStruct for DTO to Entity and vice-versa for convention over configuration mapping
- Git Flow and Conventional Commits tools for code versioning
- TDD
- Testing main API functionalities with Unit Testing
- API endpoints testing with Postman
- SpringDoc OpenAPIDoc
- etc...
mvn clean test
First run the mvn clean test command to generate jacoco.exec file then
run the command below to generate the jacoco html report.
mvn jacoco:report
The html report can be found at target/site/jacoco/index.html
To run the project simply run
mvn spring-boot:run
The api will be served at port 8080.
In order to access the api, path is localhost:8080/api/v1/beers
You can find the swagger-ui OpenAPI Documentation at localhost:8080/swagger-ui.html