These are chat archives for spring-cloud/spring-cloud
Normally you don't want the config server to be a config client itself, so this listener disables the config client unless spring.cloud.config.enabled is explicitly "true". It has to be "true" at the time this listener is fired, which means before the bootstrap.yml is parsed, which in turn means to you need to launch the application with an existing primed Environment (e.g. via System properties or a SpringApplicationBuilder). This is the same rule of precedence as for anything else affecting the bootstrap process itself, e.g. setting spring.cloud.bootstrap.name to something other than "bootstrap".
spring.cloud.config.enabled=falseshould cause the applicaiton to fail bootstrapping unless
spring.cloud.config.discovery.enabled=false? Specifically it fails autowiring a Discovery client into
DiscoveryClientConfigServiceBootstrapConfigurationbut it seems to me like the former should take precedence over the latter? unless i’m misunderstanding the intent
DiscoveryClientConfigServiceBootstrapConfigurationshould also be conditional on whether the overall config is enabled or not
@ConditionalOnPropertyis not repeatable, so I suppose I’m out of luck :-)
@ConditionalOnProperty- that way you can repeat it