Skip to content

Properties eureka.client.enabled and spring.cloud.consul.discovery.enabled have no effects without bootstrap #785

@xhuy-le

Description

@xhuy-le

Describe the bug
I try to locate the config server by using a discovery service client (Eureka or Consul). When only one artifact spring-cloud-starter-netflix-eureka-client or spring-cloud-starter-consul-discovery is present in the classpath, the app locates successfully the config server, regardless the value of eureka.client.enabled and spring.cloud.consul.discovery.enabled (check out the main or feature/register_with_consul branches of the sample project).

When both artifacts spring-cloud-starter-netflix-eureka-client or spring-cloud-starter-consul-discovery are present in the classpath, the Consul discovery client is always used by the app to locate the config server, regardless the value of eureka.client.enabled and spring.cloud.consul.discovery.enabled (check out the feature/without_bootstrap branch of the sample project).

On the other hand, it works as expected when I use the Config First Bootstrap with Discovery Lookup First enabled (feature/with_bootstrap branch of the sample project).

Sample
Here is the link to the sample project https://github.com/xhuy-le/spring-cloud-discovery-client-issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions