This project is the backend implementation of an Employee Management System using Spring Boot. It provides RESTful APIs for managing employees, including functionalities such as creating, updating, deleting, and retrieving employee information.
- CRUD operations for managing employees
- RESTful APIs for interacting with the system
- Integration with a relational database (MySQL) for data storage
- Robust error handling and validation
- Java
- Spring Boot
- Spring Data JPA
- Hibernate
- MySQL (or your preferred relational database)
- JDK (Java Development Kit) installed on your machine
- Maven for building the project
- MySQL database (or your preferred relational database) installed and running locally
-
Clone this repository to your local machine:
git clone https://github.com/Aryasharma001/EmployeManagement.git
-
Navigate to the project directory:
cd EmployeManagement
-
Open the
application.properties
file located in thesrc/main/resources
directory and configure the database connection properties according to your environment:spring.datasource.url=jdbc:mysql://localhost:3306/employee_db spring.datasource.username=<your-username> spring.datasource.password=<your-password>
-
Build the project using Maven:
mvn clean install
-
Run the application:
mvn spring-boot:run
-
The application will start running at
http://localhost:8080
. You can now use the provided RESTful APIs to manage employees.
- GET /employees: Get a list of all employees.
- GET /employees/{id}: Get the details of a specific employee by ID.
- POST /employees: Create a new employee.
- PUT /employees/{id}: Update an existing employee.
- DELETE /employees/{id}: Delete an employee by ID.
The API provides detailed error responses in case of invalid requests or server errors. Error responses include appropriate HTTP status codes and error messages to help users understand and resolve issues.