Search code examples
javaspringspring-cloud-feignspring-cloud-consul

How to configure Feign client to work without Consul


Can someone help to find out why I can't setup locally FeignClient using application.properties and without running consul?

client:

@FeignClient(value = "my-service", configuration = FeignConfig.class) {
  ...
}

application.properties:

spring.cloud.consul.config.enabled=false
my-service.ribbon.listOfServers=127.0.0.1:8091

Solution

  • Manage to configure @FeignClient too work with hardcoded address using these configs in aplication.properties :

    <service-name>.ribbon.listOfServers=<ip:port>
    spring.cloud.bus.enabled=false
    spring.cloud.consul.discovery.enabled=false
    spring.cloud.consul.enabled=false