A RESTful Employee Management System built using Spring Boot, Spring Data JPA, and MySQL. This project provides APIs to manage employee records with CRUD operations following a layered architecture.
- β Add Employee
- π Get All Employees
- π Get Employee By ID
- βοΈ Update Employee Details
- β Delete Employee
- π¦ DTO Pattern
- π Entity Mapper
β οΈ Global Exception Handling- ποΈ MySQL Database Integration
- ποΈ Layered Architecture
- Java 17+
- Spring Boot
- Spring Data JPA
- Hibernate
- MySQL
- Maven
- REST API
- Git & GitHub
src
βββ main
βββ java
β βββ com.example.EmployeeManagementSystem
β βββ controller
β βββ dto
β βββ exception
β βββ mapper
β βββ model
β βββ repository
β βββ service
β βββ EmployeeManagementSystemApplication
β
βββ resources
βββ application.properties
git clone https://github.com/anup-sys/EmployeeManagementSystem.gitcd EmployeeManagementSystemCREATE DATABASE employee_db;Update application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/employee_db
spring.datasource.username=root
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=updatemvn spring-boot:runApplication will start on:
http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
| GET | /employees | Get All Employees |
| GET | /employees/{id} | Get Employee By ID |
| POST | /employees | Add New Employee |
| PUT | /employees/{id} | Update Employee |
| DELETE | /employees/{id} | Delete Employee |
You can test the APIs using:
- Postman
- Thunder Client
- Insomnia
- JWT Authentication
- Spring Security
- Swagger Documentation
- Pagination & Sorting
- Docker Support
- Role-Based Access Control
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to GitHub
- Create a Pull Request
This project is licensed under the MIT License.
Anup
GitHub: https://github.com/anup-sys
If you like this project, don't forget to β star the repository.