February 2019
Intermediate to advanced
442 pages
11h 46m
English
In microservice architecture, generally microservices interact with each other through HTTP REST web service calls. Typically, RestTemplate is used as a client to make REST API call programmatically in Spring-based applications. However, it requires a good amount of code to make a simple REST call. To make this simple, Spring Cloud provides Feign, another REST client that makes REST communication alot simpler than RestTemplate. Let's see how Feign makes calls to other services easy.
For example, inventory-service needs to talk with the catalog-service microservice to fetch book details. In this case, inventory-service will make a REST call to fetch a Book object for a given bookId. This ...