how to build a feign target with eureka-client?
how to build a feign target with eureka-client? code like this:
GitHub github = (GitHub)Feign.builder().target(GitHub.class, ${eureka-client-instance},${appName});
the ${eureka-client-instance} is the eureka-client instance
the ${appName} is the target app which is registered in eureka-server.
See the ribbon module documentation: https://github.com/OpenFeign/feign/tree/master/ribbon#usage
Something like this:
MyService api = Feign.builder().client(new RibbonClient()).target(MyService.class, "https://myAppProd");
i also have the same to your problem!how to build a feign target with eureka-clien,would you fixed?please tell me solution,thank you very much
Hi @spencergibb, I checked the pom.xml and it's not using Eureka. Does the feign + ribbon solution use Eureka?
is there any solution? i also have the same problem.
It is possible. You will need to include ribbon-eureka in your application and provide the eureka information to the Ribbon client via the LBClientFactory option. You may need to write your own LBClientFactory to provide a Discover Enabled server.
hi @kdavisk6 do you have an example of how this could be done ? i.e providing the eureka information tot he Ribbon Client via LBClientfactory..