It's pretty uncommon for Spring apps, but sometimes YAML is not a
map, but more naturally a String or Collection. In these cases Spring
puts a "document" prefix in the Map it creates, so we can strip that
off if the user prefers it.
Fixes gh-143
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
E.g. spring.cloud.config.server.overrides.foo=$\{bar} will evaluate
to foo=${bar} in the client's Environment (allowing local replacement
of the placeholder instead of on the configserver).
This commit adds a getDefaultLabel() method to the EnvironmentRepository
interface. SvnKitEnvironmentRepository returns 'trunk', while all other
implementations return 'master'. ConfigServerMvcConfiguration and
ConfigServerBootstrapConfiguration will utilize labels configured on
the client and server before falling back to the repository's default
label.
Resolves#107
The SCM repositories have a "clean()" method to strip out the server's
own configuration files from the property sources shipped to remote
clients. The "native" one didn't have that method so this change adds
it with a similar implementation to the SCM case, except slightly
more complicated because of the extra search locations added by the
"label" parameter.
Also changes the name SpringApplicationEnvironmentRepository to
NativeEnvironmentRepository to match the profile and the config properties.
Fixes gh-109
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
Spring MVC lops off the "extension" from request paths by default
(causing no end of other problems), but in this case making it
impossible, or unintuitive at best, to use version-like labels
in git repositories (e.g. 1.0.0). This change makes the mapping
a regex match which includes the whole path, not just the stem.
Fixes gh-94