Users see it logged by the config client, and it appears in the
Environment response from the config server. It's hard to add it
to the /env endpoint without some extension points in Boot.
Fixes gh-244, fixes gh-245
If Spring Retry is on the classpath (and AspectJ) the config client
will create a proxy for the ConfigServerPropertySourceLocator that
retries a failed environment fetch. In this way the client can be
made to wait for the config server to come up, even if failFast=true.
(If failFast=false, the default, then it has no effect.)
Fixes gh-90, fixes gh-129
A BeanPostProcessor has to be a good citizen and not force other beans
to be instantiated. ConfigurationPropertiesRebinder was a nightmare in
this regard. Fixed now by knowing the bean ids of its dependencies.
This change adds a listener that inserts a PropertySource really early
so that spring.cloud.config.enabled=false is the default in a config
server. It can be overridden if the user primes the Environment with
spring.cloud.config.enabled=true.
See gh-104
In the unlikely event that the property source locator throws an
exception we go with DOWN, but if there are no property sources
we just mark it as UNKNOWN. It's then a business decision whether or
not to rely on the server to be there at runtime (e.g. in a /refresh).
See gh-104
By adding a proxyMode to the @RefreshScope annotation we
no longer need to do all teh autoProxy stuff in GenericScope
(apparently Spring does it for you now).
See gh-96
The connectors project doesn't use any of the subpackages we do
here so if we movethe Environment and PropertySource into a sub-
package it should be safe.
See gh-91
The Environment only picks up the "bootstrap" property source when
the parent context is set, and that was happening at order=0. Moving
it to a higher order than the decryption initializer makes it possible
to decrypt properties in bootstrap.
Fixes gh-84
On startup a bean will be bound by the
ConfigurationPropertiesBindingPostProcessor and then initialized
by the ApplicationContext. The ConfigurationPropertiesRebinder
does the binding but not the initialization (until this change).
Fixes gh-80
Since the bootstrap customizations are applied in ApplicationContextInitializers
they come too late to affect the logging levels. But the LoggingRebinder listener
isn't installed yet, and the context is not ready for events to be published. So
to get the logging changes in as early as possible we actually need to explicitly
apply them in the property source initializer as soon as the remote properties are
available.
Fixes gh-74, fixes gh-75
In the server we use a SpringApplicationEnvironmentRepository to load
the YAML and properties files from git (or locally). It creates a mini
SpringApplication so as to faithfully replicate the way the Environment
is created. Unfortunately that can have side effects on the server
application itself (e.g. setting log levels). In particular if the
mini SpringApplication fails to start then the log levels could be
left in a "preInitialized" state with all log levels OFF by default.
This change ensures that the server logs all errors when loading YAML
and properties files, and also that the client logs the error response
if it is JSON (as it should be).
Fixes gh-66, fixes gh-67