Skip to content

A full-stack web application built with Java, Spring Boot, Thymeleaf, and MongoDB for managing employee records. Features include add, update, delete, and view functionalities with a user-friendly UI and layered architecture for clean code maintenance.

Notifications You must be signed in to change notification settings

sudhir1825/EmployeeManagementApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee Management Application

A Spring Boot-based web application for managing employee data. The system allows you to add, update, delete, and view employees via both HTML views and RESTful APIs. It also includes integrated Swagger documentation for easy API testing.

How the application works:

Check it out in this link - https://drive.google.com/file/d/1EYr4rVNnXKf_7c12iI21RaptLMMkfD_9/view?usp=sharing


🔧 Tech Stack

  • Java 11+
  • Spring Boot
  • Spring MVC & REST
  • Spring Data JPA
  • Thymeleaf
  • Swagger (OpenAPI)
  • Maven
  • MongoDB

📁 Project File Structure

EmployeeManagementApplication/
├── EmpAppAPIDoc.json                     # Swagger/OpenAPI documentation
├── src/
│   └── main/
│       ├── java/
│       │   └── com/example/EmployeeManagementApplication/
│       │       ├── Config/
│       │       │   └── SwaggerConfig.java                 # Swagger setup
│       │       ├── Controller/
│       │       │   ├── EmployeeController.java            # Handles HTML views
│       │       │   └── EmployeeRestController.java        # RESTful API controller
│       │       ├── Entity/
│       │       │   └── EmployeeEntity.java                # JPA Entity for employee
│       │       ├── Exception/
│       │       │   ├── EmailAlreadyExistsException.java   # Custom exception
│       │       │   └── GlobalExceptionHandler.java        # Centralized exception handling
│       │       ├── Repository/
│       │       │   └── EmpRepository.java                 # JPA Repository
│       │       ├── Service/
│       │       │   ├── EmployeeService.java               # Service interface
│       │       │   └── EmpService.java                    # Service implementation
│       │       └── EmployeeManagementApplication.java     # Main Spring Boot class
│       └── resources/
│           ├── static/                                    # Static assets (empty now)
│           └── templates/                                 # Thymeleaf HTML views
│               ├── addEmployee.html
│               ├── index.html
│               ├── Update.html
│               └── view.html
├── .gitignore
├── pom.xml                                               # Maven configuration 

▶️ How to Run the Application

1. Clone the Repository

git clone https://github.com/sudhir1825/EmployeeManagementApplication.git
cd EmployeeManagementApplication
  1. Build the Project If you have Maven installed:
mvn clean install

Or use the Maven Wrapper:

./mvnw clean install        # macOS/Linux
mvnw.cmd clean install      # Windows
  1. Run the Application
mvn spring-boot:run

Or with Maven Wrapper:

./mvnw spring-boot:run      # macOS/Linux
mvnw.cmd spring-boot:run    # Windows

🌐 Access Points

HTML UI: http://localhost:8081/
REST APIs:
GET /api/employees
POST /api/employees
PUT /api/employees/{id}
DELETE /api/employees/{id}

Swagger Documentation:

http://localhost:8081/swagger-ui.html

🧪 Sample API Payload (POST Employee)

{
  "Firstname": "Sudhir",
  "Lastname": "Rangasamy",
  "email": "sudhir@example.com", 
}

About

A full-stack web application built with Java, Spring Boot, Thymeleaf, and MongoDB for managing employee records. Features include add, update, delete, and view functionalities with a user-friendly UI and layered architecture for clean code maintenance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published