This project is a simple Employee Management System developed using Spring Boot for learning purposes. It provides basic CRUD (Create, Read, Update, Delete) operations for managing employee records.
-
Create an Employee:
- Endpoint:
POST /employees
- Description: Add a new employee to the Backend.
- Request Body: JSON object representing the employee details.
- Endpoint:
-
Update an Employee:
- Endpoint:
PUT /employees/{employeeId}
- Description: Update the details of an existing employee.
- Request Body: JSON object with updated employee details.
- Endpoint:
-
List of Employees:
- Endpoint:
GET /employees
- Description: Retrieve a list of all employees in the system.
- Endpoint:
-
Delete Employee:
- Endpoint:
DELETE /employees/{employeeId}
- Description: Delete an employee from the system by providing the employee ID.
- Endpoint:
-
View Employee:
- Endpoint:
GET /employees/{employeeId}
- Description: Retrieve details of a specific employee by providing the employee ID.
- Endpoint:
- Spring Boot: Framework for building Java-based enterprise applications.
- Spring Data JPA: Simplifies data access using JPA (Java Persistence API).
- RESTful API: Follows REST principles for communication between the client and server.
- Maven: Project management and build tool.
- MYSQL Database: In-memory database for simplicity in the learning environment.
- Ensure you have Java and Maven installed on your machine.
- Clone the repository:
git clone <https://github.com/RachamallaYeswanthReddy/Employee-Management-System>
- Create the Springboot App from the SpringInitializer
- Select Project as Maven , Select the Version of Springboot as Default and In group name as com.Employee-Management-System
- Add the Following in the Dependencies
- Spring Web
- Spring Web Services
- Spring Data JPA
- MYSQL Driver
- Download the Project And Extract the zip file in respective folder
- Replace the src with the cloned src folder
- Build the project:
mvn clean install
- Run the project
The application will be accessible at http://localhost:8080
.
API documentation is available using Swagger. After running the application, access Swagger UI at: http://localhost:8080/swagger-ui.html
Use the PostMan to Add the Employee
Create Blank Collection and Add the Request
To Create the Employee Use Post call
{
"firstName":"Latha ",
"lastName":"Rachamalla",
"emailId":"latharachamalla@gmail.com"
}
http://localhost:8080/employee/employees/3
{
"firstName":"Jai Kumar ",
"lastName":"Rachamalla",
"emailId":"jaikumarreddi@gmail.com"
}
http://localhost:8080/employees
DELETE http://localhost:8080/employees/3
curl http://localhost:8080/employees/2
Feel free to contribute to the project by opening issues or submitting pull requests. Your feedback and suggestions are highly appreciated.
This project is licensed under the MIT License - see the [LICENSE] file for details.