{"id":20900420,"url":"https://github.com/rahul-ghadge/spring-boot-microservices-gradle","last_synced_at":"2025-05-13T01:32:22.723Z","repository":{"id":102526774,"uuid":"280842344","full_name":"rahul-ghadge/spring-boot-microservices-gradle","owner":"rahul-ghadge","description":"Spring boot micro services with Eureka Server, Eureka client, Ribbon, Feign, Zuul Proxy, calling API using RestTemplate and WebClient with Externalized configuration using Config Server, tested using Mockito Framework.","archived":false,"fork":false,"pushed_at":"2020-08-03T12:54:58.000Z","size":128,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-01T15:09:58.162Z","etag":null,"topics":["config-server","eureka-client","eureka-server","feign-client","gradle","mockito","resttemplate","ribbon","spring-boot","spring-cloud","webclient","zuul-proxy"],"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/rahul-ghadge.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":"2020-07-19T10:28:38.000Z","updated_at":"2023-12-27T12:12:41.000Z","dependencies_parsed_at":"2023-07-09T07:31:33.153Z","dependency_job_id":null,"html_url":"https://github.com/rahul-ghadge/spring-boot-microservices-gradle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-ghadge%2Fspring-boot-microservices-gradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-ghadge%2Fspring-boot-microservices-gradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-ghadge%2Fspring-boot-microservices-gradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-ghadge%2Fspring-boot-microservices-gradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahul-ghadge","download_url":"https://codeload.github.com/rahul-ghadge/spring-boot-microservices-gradle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253854069,"owners_count":21974221,"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":["config-server","eureka-client","eureka-server","feign-client","gradle","mockito","resttemplate","ribbon","spring-boot","spring-cloud","webclient","zuul-proxy"],"created_at":"2024-11-18T11:19:29.423Z","updated_at":"2025-05-13T01:32:22.715Z","avatar_url":"https://github.com/rahul-ghadge.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Micro Services with Gradle\n\nRESTful web services are the first step to developing great microservices. Spring Boot,\nin combination with Spring Web MVC (also called Spring REST) makes it easy to develop RESTful web services.  \nHere we will learn the basics of Microservices from scratch and will understand how to implement microservices using Spring Cloud.\n\n### APIs used to get country details\n\u003e https://restcountries.eu/rest/v2/name/India - Get country details by name  \n\u003e https://restcountries.eu/rest/v2/name/japan - Get country details by name  \n\u003e https://restcountries.eu/rest/v2/currency/INR -  Get country details by currency\n\n## You will learn\n- You will be able to develop and design RESTful web services\n- You will setup Centralized Microservice Configuration with **Spring Cloud Config Server**\n- You will learn to register **Eureka Client** applications with **Eureka Server**\n- You will learn how to implement Circuit breaker for fault tolerance using **Hystrix** \n- Consume Third party API using **RestTemplate** and **WebClient**\n- **Load Balance** using **Ribbon** for RestTemplate and WebClient\n- You will learn declarative web service HTTP client with the help of **Feign**\n- You will be able to consume and communicate other RESTful web services using **Ribbon** and **Feign**\n- You will understand how to monitor RESTful Services with **Spring Boot Actuator**\n- You will understand the best practices in designing RESTful web services\n\n\n## Prerequisites \n- Java (Java 8)\n- [Spring Boot](https://spring.io/projects/spring-boot)\n- [Gradle](https://docs.gradle.org/current/userguide/userguide.html)\n\n## Tools\n- Eclipse or IntelliJ IDEA (or any preferred IDE) with embedded Gradle\n- Gradle (version \u003e= 6.0)\n- Postman (or any RESTful API testing tool)\n\n\n## Modules / Sub-modules\n| Name                                        | Port                 | Description  |\n| ------------------------------------------- |:-------------       | ---------:|\n| spring-boot-microservices-gradle(root)      | (Root/Parent module) |    |\n| common-country-client                       | 8300, 8301,.. **(or dynamic random port)**  |    |\n| common-model                                |                      |    |\n| country-config-server                       | 8888 (**optional**)  |    |\n| country-currency-webclient-client           | 8200, 8201,.. **(or dynamic random port)**  |    |\n| country-details-restful-client              | 8100, 8101,.. **(or dynamic random port)**  |    |\n| eureka-naming-server                        | 8761                 |    |\n| ribbon-feign-client                         | 8000                 |    |\n| zuul-api-country-details                    | 8090                 |    |\n\u003e You can dynamically run multiple instances for ``restful-client`` and ``webclient-client`` applications by changing ports as shown above  \n\u003e Each instance will get registered under ``Eureka Server`` and urls will be mapped respectively.\n\n\n## Build with Gradle\n_GOTO \u003e_ **~/absolute-path-to-directory/spring-boot-microservices-gradle/**  \nand try below command in terminal\n\u003e **```gradle clean build```** it will build all sub-modules from parent module  \n\n_If in case face any issue while building modules because of test cases, then try build with disabling test cases_\n\u003e **```gradle clean build -x test```**\n\n## Order to Run the Applications\n1. **eureka-naming-server**\n2. **country-config-server** (**optional**)\n3. **country-currency-webclient-client**\n4. **country-details-restful-client**\n5. **common-country-client**\n6. **ribbon-feign-client**\n7. **zuul-api-country-details**\n\u003e Under each module you will find ``*Aplication.java`` class, run ``main()`` method from that class\n\n\n## API Endpoints\n| Name                                        | URL                                               | \n| ------------------------------------------- |:------------------------------------------------  | \n| eureka-naming-server                        | http://localhost:8761                             | \n| common-country-client                       | http://localhost:8300/india or **{random.port}**  | \n| country-config-server                       | http://localhost:8888                             | \n| country-currency-webclient-client           | http://localhost:8200 or **{random.port}**, http://localhost:8201 or **{random.port}**,...| \n| country-details-restful-client              | http://localhost:8100 or **{random.port}**, http://localhost:8101 or **{random.port}**,...| \n| ribbon-feign-client                         | http://localhost:8000                             | \n| zuul-api-country-details                    | http://localhost:8090/common-country-client/india | \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-ghadge%2Fspring-boot-microservices-gradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahul-ghadge%2Fspring-boot-microservices-gradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-ghadge%2Fspring-boot-microservices-gradle/lists"}