Skip to content

Latest commit

Β 

History

History
158 lines (111 loc) Β· 2.72 KB

File metadata and controls

158 lines (111 loc) Β· 2.72 KB

πŸš€ Employee Management System

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.


πŸ“Œ Features

  • βž• 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

πŸ› οΈ Tech Stack

  • Java 17+
  • Spring Boot
  • Spring Data JPA
  • Hibernate
  • MySQL
  • Maven
  • REST API
  • Git & GitHub

πŸ“‚ Project Structure

src
└── main
    β”œβ”€β”€ java
    β”‚   └── com.example.EmployeeManagementSystem
    β”‚       β”œβ”€β”€ controller
    β”‚       β”œβ”€β”€ dto
    β”‚       β”œβ”€β”€ exception
    β”‚       β”œβ”€β”€ mapper
    β”‚       β”œβ”€β”€ model
    β”‚       β”œβ”€β”€ repository
    β”‚       β”œβ”€β”€ service
    β”‚       └── EmployeeManagementSystemApplication
    β”‚
    └── resources
        └── application.properties

βš™οΈ Installation

Clone Repository

git clone https://github.com/anup-sys/EmployeeManagementSystem.git
cd EmployeeManagementSystem

Create MySQL Database

CREATE DATABASE employee_db;

Configure Database

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=update

Run the Project

mvn spring-boot:run

Application will start on:

http://localhost:8080

πŸ“‘ API Endpoints

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

πŸ§ͺ Testing

You can test the APIs using:

  • Postman
  • Thunder Client
  • Insomnia

🌟 Future Improvements

  • JWT Authentication
  • Spring Security
  • Swagger Documentation
  • Pagination & Sorting
  • Docker Support
  • Role-Based Access Control

🀝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to GitHub
  5. Create a Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Developer

Anup

GitHub: https://github.com/anup-sys

If you like this project, don't forget to ⭐ star the repository.