Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yildizmy/employee-management

Microservices demo with Spring Boot, Spring Cloud, FeignClient and Zipkin
https://github.com/yildizmy/employee-management

employee employee-management eureka eureka-client eureka-server feign-client java microservice microservices microservices-architecture rest-api spring-boot spring-cloud spring-cloud-config spring-cloud-gateway spring-cloud-microservice spring-cloud-netflix spring-cloud-openfeign spring-mvc zipkin

Last synced: 12 days ago
JSON representation

Microservices demo with Spring Boot, Spring Cloud, FeignClient and Zipkin

Awesome Lists containing this project

README

        

## employee-management
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.

### Description

This project is created to demonstrate useful features of [Spring Cloud Project](https://spring.io/projects/spring-cloud) 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.


### Architecture

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.


## Getting Started

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](https://docs.docker.com/desktop/install/mac-install/)

> [Install on Windows](https://docs.docker.com/desktop/install/windows-install/)

> [Install on Linux](https://docs.docker.com/desktop/install/linux-install/)


### Running the application

In order to run the application on local, follow these steps:

1. Run Docker desktop.


2. Open command prompt window and clone the project from GitHub using the following command:

```shell
git clone https://github.com/yildizmy/employee-management.git
```

3. Run Zipkin container with the following command:

```shell
docker run -d --name zipkin -p 9411:9411 openzipkin/zipkin
```

4. Open the project using `IntelliJ IDEA`. Then select `Java 21` version via `File > 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**)


### Testing the application

In order to test the application by sending request, see details on [How to test?](config-service/src/main/resources/docs/how_to_test.md) section.


### Dependencies

* Spring Boot
* Spring Cloud
* Spring Cloud Netflix - Eureka
* Spring Cloud Config
* Spring Cloud OpenFeign
* Docker
* Zipkin


### Documentation
[Spring Boot](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/)

[Spring Cloud](https://spring.io/projects/spring-cloud/)

[Spring Cloud Netflix - Eureka](https://cloud.spring.io/spring-cloud-netflix/reference/html/)

[Spring Cloud Config](https://docs.spring.io/spring-cloud-config/docs/current/reference/html/)

[Spring Cloud OpenFeign](https://docs.spring.io/spring-cloud-openfeign/docs/current/reference/html/)

[Docker](https://www.docker.com/)

[Zipkin](https://zipkin.io/)


### Version History

* v0.0.1 Initial Release