- All Implemented Interfaces:
- EventListener, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>, org.springframework.core.Ordered
public class ConfigServerBootstrapApplicationListener
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>, org.springframework.core.Ordered
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".
- Author:
- Dave Syer