https://github.com/vindhya733/employee-rest-service
Spring Boot REST API for managing employee data with JUnit tests
https://github.com/vindhya733/employee-rest-service
employee java junit management maven restapi springboot
Last synced: 3 months ago
JSON representation
Spring Boot REST API for managing employee data with JUnit tests
- Host: GitHub
- URL: https://github.com/vindhya733/employee-rest-service
- Owner: Vindhya733
- Created: 2025-06-26T20:21:07.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-26T20:36:59.000Z (4 months ago)
- Last Synced: 2025-06-26T21:58:08.031Z (4 months ago)
- Topics: employee, java, junit, management, maven, restapi, springboot
- Language: Java
- Homepage: https://github.com/Vindhya733/employee-rest-service
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Employee REST Service
A Spring Boot REST API that manages employee data with support for:
- Retrieving employee records via HTTP GET
- Adding new employees via HTTP POST
- Unit testing using JUnit and Spring Boot Test framework## Features
- ๐ Add and retrieve employee details
- โ Unit tests using `@SpringBootTest` and `TestRestTemplate`
- ๐งช Tests validate API endpoints and ensure application reliability## Tech Stack
- Java 17+
- Spring Boot
- Maven
- JUnit 5
- Spring Boot Test
- VS Code / IntelliJ## Project Structure
src/
โโโ main/
โ โโโ java/
โ โโโ com/example/demo/
โ โโโ Employee.java
โ โโโ EmployeeController.java
โ โโโ EmployeeManager.java
โ โโโ Employees.java
โ โโโ RestServiceApplication.java
โโโ test/
โ โโโ java/
โ โโโ com/example/demo/
โ โโโ EmployeeControllerTest.java## How to Run
1. **Clone the repository**
git clone https://github.com/Vindhya733/employee-rest-service.git
cd employee-rest-service2. **Build the project**
mvn clean install
4. **Run the application**
mvn spring-boot:run
6. **Access endpoints**
POST /employees โ Add a new employee## Run Tests
To run all unit tests:
mvn test## License
This project is for educational/demo purposes only.