Welcome to the Spring Boot Microservice API project! π
This project demonstrates a microservice architecture using Spring Boot v3.5.0, Java 17, and Maven, with support for employee and department management.
The services are registered with Netflix Eureka, and communication is routed through an API Gateway. π―
| Tool/Framework | Version | Purpose |
|---|---|---|
| π§° Spring Boot | 3.5.0 | Application framework |
| β Java | 17 | Programming language |
| π οΈ Maven | β | Dependency & build management |
| π Eureka Server | Netflix OSS | Service discovery |
| π Spring Cloud Gateway | β | API Gateway for routing |
This system consists of the following key components:
-
ποΈ Service Registry (Eureka Server)
- Manages service discovery and registration.
-
π’ Department Service
- Add/Search departments
- Search employees under a department
-
π€ Employee Service
- Add/Search employees
- Assign employee to a department
-
π£οΈ API Gateway
- Central entry point for all service requests
- Handles routing and load balancing
β
Add a new employee
β
Add a new department
β
Assign employees to departments
β
Retrieve employee by ID
β
Retrieve department by ID
β
Retrieve all employees in a department
β
Microservices registered in Eureka
β
Requests routed through a central API Gateway
Each folder represents a standalone Spring Boot microservice.
Make sure you have the following installed:
- Java 17+
- Maven 3.6+
- IDE (IntelliJ / VSCode / Eclipse)
- Postman or Curl for testing
- Clone the Repository
git clone https://github.com/your-username/spring-boot-microservice-api.git cd spring-boot-microservice-api
Start the Eureka Server
cd service-registry
mvn spring-boot:run
Start the Department Service
cd ../department-service
mvn spring-boot:run
Start the Employee Service
cd ../employee-service
mvn spring-boot:run
Start the API Gateway
cd ../api-gateway
mvn spring-boot:run