0

I am using FeignClient to discover the services which registered in Zookeeper.

In my case, service is registered in zookeeper under "/rsservices/sparkexecutor".

But when i gave @FeignClient(name = "sparkexecutor"), i think it tries to discover from /services by default. How to tell Feign Client to check under /rsservices instead of /services

Please help

  • According to the document, it doesn't discover it on the services endpoint. There should be a client that has the same name that has a method implemented to goes to the proper URL. See this for an example: https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html. – Will C Oct 23 '18 at 03:31

1 Answers1

0

I understand that /services is set in this java file (root property) org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryProperties.java

Since the java file is annotated with @ConfigurationProperties("spring.cloud.zookeeper.discovery")

I set the below in my application.yml file to override the default root folder value. It resolves my issue.

spring: cloud: zookeeper: discovery: root: /rsservices