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.