I have the following services
Service A - Sends request to service B using RestTemplate.
Service B - Has an end point that returns "Hello Universe".
Service G - "Spring Cloud Gateway".
Service A sends request to Service B using API Gateway URL using REST Template.
But, how does it work with Feign Client? For example below is the FeignClient of Service B in Service A
@FeignClient(name = "serviceb")
public interface ServiceBClient {
@GetMapping("/getmessage/")
public Inventory getInventoryDetails();
}
I believe one of the primary reasons we use a gateway is to allow the service A to send request to Gateway instead of directly using the service name.
But it seems with feign client the purpose is destroyed.
How to send request to Gateway using feign client?