https://github.com/destrutoyt/spring-rest-demo
https://github.com/destrutoyt/spring-rest-demo
api-rest crud java mysql postman rest-api spring spring-boot
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/destrutoyt/spring-rest-demo
- Owner: destrutoyt
- Created: 2025-09-07T02:05:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-07T02:38:56.000Z (11 months ago)
- Last Synced: 2025-09-07T04:16:07.235Z (11 months ago)
- Topics: api-rest, crud, java, mysql, postman, rest-api, spring, spring-boot
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring REST API Demo
This project demonstrates how to design and build **RESTful APIs** with the **Spring Framework**.
It connects to a **MySQL database**, retrieves and manipulates data, converts it into **JSON**, and exposes it through REST endpoints that can be consumed by web applications or other clients.
The application showcases key backend development skills, including:
- ๐ **Building REST APIs with Spring Boot**
- ๐๏ธ **CRUD operations (Create, Read, Update, Delete)**
- ๐ข๏ธ **Database integration with MySQL using Spring Data JPA**
- ๐ **Object Relational Mapping (ORM)**
- ๐ฆ **Data serialization with Jackson (JSON)**
- โ ๏ธ **Exception handling & validation**
- ๐๏ธ **Layered architecture (Controller โ Service โ Repository)**
- ๐ ๏ธ **API testing with Postman**
---
## ๐ Tech Stack
- โ **Java 21**
- ๐ฑ **Spring Boot 3 / Spring Framework 6**
- ๐ข๏ธ **MySQL**
## ๐ฆ Dependencies
- ๐ **Spring Web** โ RESTful API development
- ๐๏ธ **Spring Data JPA** โ ORM and database queries
- ๐ **MySQL Connector/J** โ JDBC driver for MySQL
- ๐ฆ **Jackson** โ JSON serialization/deserialization
- ๐งช **Spring Boot Starter Test** โ unit & integration testing
## ๐ ๏ธ Development Tools
- ๐งโ๐ป **VS Code** โ IDE for coding
- ๐ ๏ธ **Postman** โ testing and documenting REST endpoints
- ๐ **Git & GitHub** โ version control & collaboration
---
## ๐ Project Details
### ๐ API Requirements
The API provides a simple **Employee Directory** service where REST clients can:
- ๐ Get a list of employees
- ๐ Get a single employee by ID
- โ Add a new employee
- โ๏ธ Update an existing employee
- โ Delete an employee
### ๐ API Endpoints
| HTTP Method | URL | CRUD Action | Description |
| ----------- | --- | ----------- | ----------- |
| **POST** | `/api/employees` | **Create** | โ Add a new employee |
| **GET** | `/api/employees` | **Read** | ๐ Fetch all employees |
| **GET** | `/api/employees/{employeeID}` | **Read** | ๐ Fetch employee by ID |
| **PUT** | `/api/employees/{employeeID}` | **Update** | โ๏ธ Update employee details |
| **DELETE** | `/api/employees/{employeeID}` | **Delete** | โ Remove employee |