Commit Graph

95 Commits

Author SHA1 Message Date
Spencer Gibb
5ceca18292 Add version to environment response
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
2015-10-02 11:40:22 +01:00
Dave Syer
df1f62374d Remove dependency on spring-boot-starter
Fixes gh-116
2015-09-23 11:06:24 +01:00
Dave Syer
92cc01c029 Add INFO logging for config server URL in client
Fixes gh-232
2015-09-23 10:34:34 +01:00
Dave Syer
f5017cdbad Revert to snapshot 2015-09-08 10:21:35 +01:00
Dave Syer
aca20566be Update for M1 release 2015-09-08 10:12:42 +01:00
Dave Syer
a964a2840a Fix typo 2015-08-14 11:11:31 +01:00
Aizhan
4aaf8cd188 avoid throwing htpp 404 error 2015-08-12 09:06:25 -06:00
Dave Syer
72096d7357 Replace spring.config.retry -> spring.cloud.config.retry
Fixes gh-197
2015-07-21 09:19:49 +01:00
Dave Syer
e946845873 Jackson is needed for compile 2015-07-21 06:51:37 +01:00
Dave Syer
14236e3837 Merge branch '1.0.x' 2015-07-18 10:00:06 +01:00
Glenn Renfro
54f76bc2fd GH-193 logs warning if failFast is false
ConfigServicePropertySourceLocator should log a warning and not an error if failFast is false
2015-07-18 09:59:53 +01:00
Spencer Gibb
e99291b6b5 add missing jackson-annotations dependency
fixes https://github.com/spring-cloud-samples/scripts/issues/14
2015-07-16 16:34:03 -06:00
Dave Syer
80d235a8be Add missing Jackson depednency 2015-07-13 11:48:21 +01:00
Dave Syer
9115872a3d Merge branch '1.0.x' 2015-07-10 11:54:41 +01:00
Kees Koffeman
ccc44db8eb Search in ancestors for bean of type ConfigClientProperties
Before this change we check that it is there, then don't look in the
ancestors. A test would be useful.

Fixes gh-191
2015-07-10 11:53:40 +01:00
Dave Syer
3e46e64e87 Update to Brixton 2015-06-26 12:57:05 +01:00
Dave Syer
1a0e6689dc Prepare master for next snapshot 2015-06-26 10:57:18 +01:00
Dave Syer
059a2078f3 Revert "added optional spring-security-rsa"
This reverts commit 343d5e47ea.
2015-06-24 20:42:11 +01:00
Spencer Gibb
343d5e47ea added optional spring-security-rsa 2015-06-24 12:18:42 -06:00
Dave Syer
bb0aab0471 Rename to health.config.enabled
More consistent with other health inidicator flags.
2015-05-27 10:06:35 +01:00
Dave Syer
4bae50676a Add spring.cloud.config.health.enabled (default true)
Fixes gh-159
2015-05-27 09:52:15 +01:00
wojtkiewicz
7437cdef49 Introduce TextEncryptorLocator abstraction
Allows more customization of encryption and decryption stack. Should
be no change for existing users.

Fixes gh-124
2015-05-26 15:26:04 +01:00
Dave Syer
ce3a20d262 Allow label to be a comman-separated list on config client
The client will search through a list of labels until it finds one
that succeeds, otherwise fail.

Fixes gh-153
2015-05-19 12:51:10 +01:00
Spencer Gibb
242baae663 add a configurable health indicator for the Config Server
fixes gh-142
2015-05-04 13:32:51 -06:00
Dave Syer
5d1af78f91 Update to 1.0.2 snapshots 2015-04-23 11:11:21 +01:00
Dave Syer
a1cbf78188 Only enable retry if failFast=true 2015-04-21 08:41:29 +02:00
Dave Syer
5f379c0a62 Add support for retry in config client
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
2015-04-21 08:20:07 +02:00
Dave Syer
5a80ce9e3a Explicitly list profiles and label in Environment
Fixes gh-111
2015-03-20 13:13:52 +00:00
Dave Syer
ea138e8dbd Default label on client is null (so server can set priority)
Fixes gh-108
2015-03-20 07:59:49 +00:00
Dave Syer
24904a4d6d Add annotation processor 2015-03-19 14:26:41 +00:00
Dave Syer
7b6fdb5f72 Re-organize non-config concerns in spring-cloud-context
Fixes gh-110 See gh-104
2015-03-19 11:49:33 +00:00
Dave Syer
02b13a41b2 Moved non-config client related code into commons
Refresh, Bootstrap and encryption features all moved into commons

See gh-104
2015-03-18 15:41:20 +00:00
Dave Syer
cab00b3edd Prevent aggressive bean instantiation with config props rebinder
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.
2015-03-18 13:05:23 +00:00
Dave Syer
83ef3e4b74 Disable config server client by default in config server
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
2015-03-17 15:14:32 +00:00
Dave Syer
b49ceed3c5 Config server health indicator default status changed to UNKNOWN
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
2015-03-17 13:13:28 +00:00
Dave Syer
bcef73bc98 Add encrypt.keyStore.secret property
So that the keystore and the key can have independent secrets
(the "secret" is the key, and the "password" is the store).

Fixes gh-98
2015-03-09 22:15:41 +00:00
Dave Syer
d4553f6a57 Update to next snapshot 2015-03-03 14:56:26 +00:00
Dave Syer
8a44cf5fa5 Simplfy RefreshScope
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
2015-03-02 15:25:46 +00:00
Dave Syer
80cc7f9800 source->environment 2015-02-27 15:52:45 +00:00
Dave Syer
9a8e8e7627 Back to configure->config
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
2015-02-27 15:33:43 +00:00
Dave Syer
105612d30e Config package name change to avoid conflict with connectors
Fixes gh-91
2015-02-25 17:13:00 +00:00
Dave Syer
32bc35b915 Re-order initializers so bootstrap properties can be decrypted
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
2015-02-13 09:52:58 +00:00
Dave Syer
f8d91ef32b Add some Javadocs 2015-02-06 09:52:23 +00:00
Dave Syer
9e35f60d97 Initialize beans after rebinding as necessary
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
2015-02-05 14:24:18 +01:00
Dave Syer
79d20a0f74 Fix error message if not failing fast
Fixes gh-78
2015-02-04 11:46:14 +01:00
Dave Syer
6d3a60b64c Add a call to update log levels during bootstrap
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
2015-01-30 11:44:22 +00:00
Dave Syer
e5e4cb0348 Change method name from getUri() to getRawUri()
Users would have seen DOWN status in a health indicator whenever
the config server was secure.

Fixes gh-69
2015-01-23 17:39:14 +00:00
Dave Syer
8c6740ab71 Use only ConfigFileApplicationListener in server mini-application
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
2015-01-21 14:40:39 +00:00
Dave Syer
55f04aaa38 More @Conditionals to prevent error if bootstrap disabled
If user disables bootstrap configuration
(spring.cloud.bootstrap.enabled:false) we have to anticipate some
beans will be missing.

Fixes gh-65
2015-01-19 16:51:53 +00:00
Dave Syer
048bc6a9a7 systemPropertiesOverride -> overrideSystemProperties 2015-01-17 15:11:47 +00:00