A RESTful API built with Java and Spring Boot for managing a product catalog.
This project was developed to practice backend development using Spring Boot.
The API follows REST principles and implements a complete CRUD for product management while applying concepts such as layered architecture, dependency injection, entity mapping, and data persistence with Spring Data JPA.
- Java 17+
- Spring Boot
- Spring Data JPA
- Hibernate
- H2 Database
- Maven
- ✅ Create products
- ✅ Retrieve all products
- ✅ Retrieve a product by ID
- ✅ Update existing products
- ✅ Delete products
- ✅ RESTful architecture
- ✅ Layered architecture (Controller, Service and Repository)
src
├── controller
├── model
├── repository
├── service
└── ProdutosApiApplication
Creating a new product using the REST API with Postman.
| Method | Endpoint | Description |
|---|---|---|
| GET | /produtos |
Retrieve all products |
| GET | /produtos/{id} |
Retrieve a product by ID |
| POST | /produtos |
Create a new product |
| PUT | /produtos/{id} |
Update a product |
| DELETE | /produtos/{id} |
Delete a product |
- Java 17 or higher
- Maven
git clone https://github.com/thurdass/produtosapi.gitcd produtosapimvn spring-boot:runThe application will be available at:
http://localhost:8080
During the development of this project I practiced:
- Building REST APIs with Spring Boot
- CRUD operations
- Spring Data JPA
- Hibernate
- Dependency Injection
- Layered Architecture
- Entity Mapping
- HTTP Methods and Status Codes
- Maven
This project was developed for educational purposes as part of my backend development studies.
