I tried to configure Feign to work with RibbonClient, something like MyService api = Feign.builder().client(RibbonClient.create()).target(MyService.class, "https://myAppProd");where myAppProd is the application that I can see in Consul. Now, if I use Spring annotations for the Feign ( @FeignClient("myAppProd"), @RequestMapping) client , everything works like a Spring Cloud module will take care of everything.
If I want to use Feign.builder()and @RequestLineI get the error:
com.netflix.client.ClientException: Load balancer does not have available server for client: myAppProd.
My first initial thought was that Feign was created to work with Eureka, and only Spring Cloud does integration with Consul, but I'm not sure about that.
So, is there a way to get Fage to work with the Consul without Spring Cloud?
Thanks in advance.
source
share