Microservices demo Spring Boot 3, Spring Cloud, FeignClient and Zipkin.
Note
To provide a clearer focus on the microservices architecture in this application, some features, such as database, services and validation have been omitted and in-memory data is used.
This project is created to demonstrate useful features of Spring Cloud Project for building microservice-based architecture. By default, Spring Cloud Config Server stores the configuration data inside the Git repository. We will change that behavior by activating the native mode. In this mode, Spring Cloud Config Server reads property sources from the classpath.
This microservices-based system consists of the following modules:
- gateway-service : acts as a proxy/gateway in our architecture
- config-service : uses Spring Cloud Config Server for running configuration server in the
native
mode - discovery-service : uses Spring Cloud Netflix Eureka as an embedded discovery server
- employee-service : sample microservice that allows to perform CRUD operation on in-memory repository of employees
- department-service : sample microservice that allows to perform CRUD operation on in-memory repository of departments and communicates with employee-service.
- organization-service : sample microservice that allows to perform CRUD operation on in-memory repository of organizations and communicates with both employee-service and department-service.
The following apps should be installed before running the application:
- A command line app
- Docker Desktop
Tip
For more information regarding the system requirements, etc. refer to the following pages:
Install on Mac
Install on Windows
Install on Linux
In order to run the application on local, follow these steps:
- Run Docker desktop.
- Open command prompt window and clone the project from GitHub using the following command:
git clone https://github.com/yildizmy/employee-management.git
- Run Zipkin container with the following command:
docker run -d --name zipkin -p 9411:9411 openzipkin/zipkin
- Open the project using
IntelliJ IDEA
. Then selectJava 21
version viaFile > Project Structure > Project > SDK
menu and run the services in the following order:
Important
If "Lombok requires enabled annotation processing" dialog appears at this stage, click "Enable annotation processing" button.
- config-service
- discovery-service
- gateway-service
- the other services (employee-service, department-service, organization-service)
In order to test the application by sending request, see details on How to test? section.
- Spring Boot
- Spring Cloud
- Spring Cloud Netflix - Eureka
- Spring Cloud Config
- Spring Cloud OpenFeign
- Docker
- Zipkin
Spring Boot
Spring Cloud
Spring Cloud Netflix - Eureka
Spring Cloud Config
Spring Cloud OpenFeign
Docker
Zipkin
- v0.0.1 Initial Release