{"id":22473338,"url":"https://github.com/arsy786/spring-boot-microservices-3","last_synced_at":"2025-03-27T16:27:02.773Z","repository":{"id":166907420,"uuid":"642461077","full_name":"arsy786/spring-boot-microservices-3","owner":"arsy786","description":"This project provides a sample implementation of microservices using Spring Boot and Spring Cloud.","archived":false,"fork":false,"pushed_at":"2024-03-17T14:35:50.000Z","size":853,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T20:13:01.313Z","etag":null,"topics":["2023","java","microservices","spring-boot","spring-cloud","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arsy786.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-18T16:06:30.000Z","updated_at":"2024-03-10T02:49:45.000Z","dependencies_parsed_at":"2024-03-17T15:47:28.943Z","dependency_job_id":null,"html_url":"https://github.com/arsy786/spring-boot-microservices-3","commit_stats":null,"previous_names":["arsy786/microservices-springboot-3","arsy786/spring-boot-microservices-3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fspring-boot-microservices-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fspring-boot-microservices-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fspring-boot-microservices-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fspring-boot-microservices-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsy786","download_url":"https://codeload.github.com/arsy786/spring-boot-microservices-3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245881195,"owners_count":20687688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2023","java","microservices","spring-boot","spring-cloud","tutorial"],"created_at":"2024-12-06T12:22:30.147Z","updated_at":"2025-03-27T16:27:02.751Z","avatar_url":"https://github.com/arsy786.png","language":"Java","readme":"# Microservices Spring Boot Project\n\nThis is a Java Spring Boot project that demonstrates the implementation of microservices architecture using Spring Boot 3.\n\nThis project was created by following the tutorial: [Microservices using SpringBoot 3.0 (YouTube/DailyCodeBuffer)](https://www.youtube.com/watch?v=HFl2dzhVuUo\u0026ab_channel=DailyCodeBuffer)\n\n## Table of Contents\n\n- [Microservices Spring Boot Project](#microservices-spring-boot-project)\n  - [Table of Contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Features](#features)\n  - [Getting Started](#getting-started)\n    - [Prerequisites](#prerequisites)\n    - [Cloning the Repository](#cloning-the-repository)\n    - [Running Services](#running-services)\n    - [Running Zipkin for Distributed Tracing](#running-zipkin-for-distributed-tracing)\n    - [Note](#note)\n    - [Using the API](#using-the-api)\n\n## Overview\n\nThis project provides a sample implementation of microservices using Spring Boot and Spring Cloud. It showcases the usage of various Spring Cloud components to build a distributed system. The project includes multiple microservices that communicate with each other through RESTful APIs. Below is the microservices architecture diagram.\n\n![microservices architecture diagram](microservices-architechture.png)\n\n- **Discovery Service (Eureka Server)**: Manages service discovery and registration. It uses Netflix Eureka Server to register microservices and facilitate inter-service communication.\n- **Config Service**: Provides centralized configuration management for microservices. It uses Spring Cloud Config Server to serve configuration properties stored in a Git repository.\n- **API Gateway (Zuul Gateway)**: Acts as the entry point for client requests, offering routing, filtering, and load balancing. It uses Netflix Zuul Gateway for request routing and filtering.\n- **Employee \u0026 Deportment Microservices**: Microservices that provide specific functionalities and communicate through the API Gateway.\n- **Distributed Tracing (Zipkin)**: Visualizes trace data between and within services. Allows us to correlate activity between servers and get a much clearer picture of exactly what is happening in our services.\n\n## Features\n\n- Demonstrates the usage of Spring Boot and Spring Cloud for building microservices.\n- Implements service discovery and client-side load balancing using Eureka.\n- Uses Spring Cloud Config for externalized configuration management.\n- (!)Illustrates circuit breaker pattern and fault tolerance with Hystrix.\n- Includes distributed tracing and monitoring using Spring Cloud Sleuth and Zipkin.\n- Implements API gateway pattern with Zuul to provide a unified entry point for the microservices.\n- Utilizes Spring Cloud Stream for event-driven communication between microservices.\n\n## Getting Started\n\n### Prerequisites\n\nTo run this project locally, you need to have the following prerequisites installed:\n\n- Git\n- Java 17\n- Maven\n- Docker (optional, for running with containers)\n\n### Cloning the Repository\n\n1. Open your terminal or command prompt.\n\n2. Clone the repository using Git:\n\n   ```bash\n   git clone https://github.com/arsy786/spring-boot-microservices-3.git\n   ```\n\n3. Navigate to the cloned repository's root directory:\n\n   ```bash\n   cd spring-boot-microservices-3\n   ```\n\n### Running Services\n\nTo run each service, follow these steps:\n\n1. Navigate to the respective service directory:\n\n   ```bash\n   cd \u003cservice-directory\u003e\n   ```\n\n2. Run the following Maven command to build and start the service:\n\n   ```bash\n   # For Maven\n   mvn spring-boot:run\n\n   # For Maven Wrapper\n   ./mvnw spring-boot:run\n   ```\n\n### Running Zipkin for Distributed Tracing\n\nTo enable distributed tracing in your microservices architecture, you can use Zipkin. Follow these steps to set up Zipkin using Docker:\n\n1. Run the following Docker command to pull and start the Zipkin container:\n\n   ```bash\n   docker run -d -p 9411:9411 openzipkin/zipkin\n   ```\n\n2. Once the Zipkin container is up and running, you can access the Zipkin web interface by navigating to:\n\n   ```bash\n   http://localhost:9411\n   ```\n\n### Note\n\nEnsure that the Discovery Service (Eureka Server), Config Service, API Gateway, and Zipkin are running before starting individual microservices to ensure proper service registration, configuration, routing, and tracing, respectively.\n\n### Using the API\n\nOnce all microservices are up and running, you can interact with them through the API Gateway. The API documentation and endpoints can be accessed via the API Gateway URL.\n\n```bash\n# api-gateway\nhttp://localhost:8060/employee\nhttp://localhost:8060/department\n```\n\nThe REST API is documented with Swagger. After starting the application, access the Swagger UI to interact with the API at:\n\n```bash\n# department-service\nhttp://localhost:8081/swagger-ui/index.html\n\n# employee-service\nhttp://localhost:8082/swagger-ui/index.html\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsy786%2Fspring-boot-microservices-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsy786%2Fspring-boot-microservices-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsy786%2Fspring-boot-microservices-3/lists"}