Skip to content

G-khan/synchronized-communication-between-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Synchronous Communication Example with Service Discovery

Demo project for Microservice Synchronous communication using Kotlin, Spring Boot, Service Discovery Eureka, Eureka Client & FeignClient

enter image description here

Requirements

  1. Java - 1.11.x
  2. Gradle- 3.x.x
  3. Clone the Service Discovery click it.

Step 1: Running the Service Discovery Open the service discovery path then, Type the following command in your terminal to run the service discovery

 ./gradlew bootRun

Step 2: Running the Payment Service Open the this project path then payment-service folder, Run the project with gradle:

 ./gradlew bootRun

Step 3: Running the Payment Service Open the this project path then banking-service folder, Run the project with gradle:

 ./gradlew bootRun

Check the link of eureka-server for seeing the registered services: http://localhost:8761/

Rest APIs

The app defines following for APIs.

POST http://localhost:8081/api/v1/payment

{
      "paymentType":"credit card",
      "bankId":"123213213213213321"
}