Skip to content

prxshxnti/crudEmployees-dao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD Employee Management System A Spring Boot project that provides basic CRUD (Create, Read, Update, Delete) operations for managing employee data. This project demonstrates the use of Spring Boot, JPA for database interactions, and RESTful APIs.

Project Structure The project is structured as follows: crudEmployees-dao ├── src │ ├── main │ │ ├── java │ │ │ └── com.example.crudDemoEmployees │ │ │ ├── DAO │ │ │ │ ├── EmployeeDAO.java │ │ │ │ └── EmployeeDAOJpaImpl.java │ │ │ ├── entity │ │ │ │ └── Employee.java │ │ │ ├── rest │ │ │ │ └── EmployeeRestController.java │ │ │ ├── service │ │ │ │ ├── EmployeeService.java │ │ │ │ └── EmployeeServiceImpl.java │ │ │ └── CrudDemoEmployeesApplication.java │ ├── resources │ └── test ├── target ├── .gitignore ├── HELP.md ├── mvnw ├── mvnw.cmd └── pom.xml

DAO Layer: Contains EmployeeDAO (interface) and EmployeeDAOJpaImpl (implementation using JPA) for data access logic. Entity Layer: Defines the Employee entity class, representing the employee table in the database. REST Controller Layer: EmployeeRestController provides RESTful endpoints to handle HTTP requests for employee data. Service Layer: EmployeeService and EmployeeServiceImpl handle business logic related to employees. Main Application: CrudDemoEmployeesApplication is the entry point for the Spring Boot application.

Features List all employees: Retrieves all employee records. Find employee by ID: Retrieves a single employee record by ID. Save employee: Adds a new employee or updates an existing one. Delete employee: Removes an employee record by ID.

Setup and Run 1.Clone the repository: git clone https://github.com/prxshxnti/crudEmployees-dao.git 2.Navigate into the project directory: cd crudEmployees-dao 3.Build the project: mvn clean install 4.Run the application: mvn spring-boot:run 5.Testing the API Once the application is running, you can access the API endpoints:

GET /api/employees - Retrieve all employees GET /api/employees/{id} - Retrieve employee by ID POST /api/employees - Create a new employee PUT /api/employees - Update an existing employee DELETE /api/employees/{id} - Delete employee by ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages