This is an Employee Dashboard system built with Spring Boot, designed to manage employee details, attendance, and related information.
- Add, update, and delete employee details
- Manage attendance and track employee performance
- REST API endpoints for employee and department management
- Dashboard to visualize employee statistics
- Built-in exception handling with custom error messages
Before running the project, ensure that you have the following software installed on your machine:
- Java: Install the latest JDK version. You can download it from Oracle or use OpenJDK.
- MySQL: A MySQL database is required to store the data.
- Install MySQL from here
- After installation, create a database named
employee_dashboard
and update theapplication.properties
file with your database credentials.
These tools are recommended to help with project development and management but are not strictly necessary:
- Maven: The project uses a build tool (choose one based on your preference) Not necessary to install manually:
- Maven:
Apache Maven 3.8.0 or later
- Maven:
- DBeaver: A database management tool for visualizing and interacting with the MySQL database.
- Postman: A tool for API testing to test REST endpoints.
- Git: Version control software for managing the remote repository.
- IntelliJ IDEA: A powerful IDE for Java development, including Spring Boot projects.
Once all software is installed and set up, you can build the project using:
- Maven:
mvn clean install
mvn spring-boot:run
To configure the database connection, open the src/main/resources/application.properties
file and update the following properties with your MySQL credentials:
spring.application.name=EmployeeDashboard
spring.datasource.url=jdbc:mysql://localhost:3306/employee_dashboard
spring.datasource.username=your_mysql_username
spring.datasource.password=your_mysql_password
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
The Employee Dashboard exposes several REST API endpoints for employee and department management. You can test these using Postman or any other API testing tool. Example endpoints:
GET /api/employees
- Fetch all employeesPOST /api/employees
- Add a new employeePUT /api/employees/{id}
- Update employee detailsDELETE /api/employees/{id}
- Delete an employee
If you encounter issues, check the following:
- Ensure MySQL is running, and your credentials are correctly set in the
application.properties
. - Check that Java 8 or higher is installed by running
java -version
. - If ports are already in use, change the application port in
application.properties
by adding:
server.port=8081