Introduction
Initial explanation of the project
This project is a REST API for product management, built by Caio Amaral and developed with Spring Boot as the final project of the Java Bootcamp – Deloitte. The application was designed with a strong focus on clean architecture, good development practices, SOLID principles, and code quality, serving as a solid foundation for modern and scalable Java applications.
The API allows full execution of CRUD (Create, Read, Update, and Delete) operations in a clear, organized, and secure manner, using DTOs, Service Layer, Spring Data JPA, and Hibernate. To facilitate development and testing, an in-memory H2 database is used, along with interactive documentation via Swagger and cloud deployment on Microsoft Azure.
All communication with the client is performed via JSON, strictly following REST standards, with appropriate HTTP status codes returned for each scenario.
Overview
The API was designed to serve as a solid and professional foundation for Java projects using Spring Boot, demonstrating a clean, maintainable, and scalable architecture.
Among the available features are:
- Product creation and listing;
- Product search by ID;
- Record update and removal;
- Global and customized exception handling;
- Simple message for API status verification;
- Access to the H2 Console via browser for database inspection;
- Interactive documentation with Swagger UI for quick endpoint testing.
Philosophy
The main goal of the project is to demonstrate a didactic, professional, and scalable approach to building REST APIs with Spring Boot, applying concepts widely used in real-world applications.
To achieve this, the application adopts:
- Clean architecture, with clear separation of responsibilities;
- Isolation of Controller, Service, and Repository layers;
- Use of DTOs to avoid direct exposure of domain entities;
- Use of mappers for conversion between entities and DTOs;
- Centralized exception handling, ensuring standardized and user-friendly responses;
- Robust validations to guarantee data integrity;
- Basic logging to support diagnostics and maintenance;
- In-memory database (H2) for faster development and testing;
- Structure prepared for cloud deployment on Microsoft Azure.
This structure improves code readability, maintainability, and makes the project easily extensible for larger and more complex applications.
Technologies Used
- Java 21
- Spring Boot
- Spring Web
- Spring Data JPA
- Hibernate
- H2 Database
- Swagger
- Maven
- Microsoft Azure (deployment)