Commit Graph

143 Commits

Author SHA1 Message Date
Biju Kunjummen
e77a3fd498 Allows more standard rsa private key for config values encryption (#323) 2018-02-15 13:50:03 -05:00
Spencer Gibb
fbabe7e3e9 Revert "Fix wrong property name to expose actuators"
This reverts commit 18ba863
2018-02-13 10:02:48 -05:00
Dave Syer
b5ac8fe725 Fix compiler warnings 2018-02-13 09:29:30 +00:00
Dave Syer
18ba863e5f Fix wrong property name to expose actuators 2018-02-13 09:26:02 +00:00
Dave Syer
46d92bb190 Fix class name change and port clash in tests 2018-02-13 09:23:06 +00:00
Spencer Gibb
9f3744d1e2 Update to new web endpoint property 2018-02-12 12:11:53 -05:00
Spencer Gibb
3a390a35fa Guard against missing EndpointAutoConfiguration class
fixes gh-319
2018-02-06 11:29:55 -05:00
Spencer Gibb
3866806a2c Install refresh scope health indicator.
RefreshScope bean is not available during auto-config, so get the bean lazily at runtime.
2018-02-05 23:07:26 -05:00
Biju Kunjummen
cdd4268b4a Adds additional test for encyptor with RSA private key (#315) 2018-02-02 13:03:39 -05:00
Spencer Gibb
00eadf47f0 Merge branch '1.3.x' 2018-02-01 23:42:19 -05:00
Spencer Gibb
f7695c7d15 Moves declaration of EnvironmentManager
fixes gh-314
2018-02-01 23:36:59 -05:00
Spencer Gibb
ca2e5e0405 Merge branch '1.3.x' 2018-02-01 19:12:51 -05:00
Spencer Gibb
cd436c7d15 Avoid proxy error if bean implements ScopedObject
fixes gh-277
2018-02-01 19:09:11 -05:00
Spencer Gibb
528ce8dca1 polish 2018-01-17 12:09:30 -05:00
Spencer Gibb
4aa2050b4b Updates for new context id generation in boot 2 2018-01-17 12:05:36 -05:00
Spencer Gibb
17adaf51d2 Test for NPE when calling getClass() in RefreshScope
fixes gh-297
2017-12-20 17:55:53 -05:00
Spencer Gibb
fb76beb3f2 Test for NPE when calling getClass() in RefreshScope
fixes gh-297
2017-12-20 17:55:25 -05:00
Dave Syer
29cb7f3500 Merge branch '1.3.x'
Test failure in spring-cloud-commons seems unrelated.
2017-12-15 16:06:56 +00:00
Dave Syer
c5382ccfd6 Refactor ConfigurationPropertiesRebinder a bit
It's not super expensive, but it all adds up, and rebinding beans
that don't need to be rebound is wasteful. This change should improve
things in three places:

The ConfigurationPropertiesRebinder
has always done a pre-emptive re-bind on startup, which was a bit
of a blunt instrument, since all we really wanted as to rebind the
beans in the parent context (to the current context's Environment).

The rebinding always happened twice for every bean because we
explicitly called into the ConfigurationPropertiesPostProcessor
directly as well as indirectly through the initialization callbacks.

Rebinding in response to an EnvironmentChangeEvent was not able to
distinguish between events published locally and by child contexts.
The child context always binds the parent's beans anyway, so you
don't need to do it twice.
2017-12-15 15:58:17 +00:00
Spencer Gibb
2fdbc5a397 Merge branch '1.3.x' 2017-11-28 20:04:25 -05:00
Spencer Gibb
259aa437d7 Allow refresh auto config to be disabled by property.
fixes gh-276
2017-11-28 19:57:54 -05:00
Spencer Gibb
6e9745b7a4 Updates for boot 2 actuator path changes 2017-11-27 13:33:41 -05:00
Spencer Gibb
a051c24bf2 Reinstate encryption test. 2017-11-22 11:41:18 -05:00
Spencer Gibb
ad9cfc665c Updates to boot 2.0 compatibility 2017-11-22 11:31:00 -05:00
Spencer Gibb
5c5e6f4d65 Merge branch 'master' into 2.0.x
# Conflicts:
#	spring-cloud-context/src/test/java/org/springframework/cloud/context/refresh/ContextRefresherTests.java
2017-11-14 11:13:12 -05:00
Spencer Gibb
1bd2c3112a Make sure cli args are copied to bootstrap. 2017-11-14 11:11:12 -05:00
Dave Syer
a513d0a4af Explicitly copy over properties from bootstrap.properties
Fixes gh-273
2017-11-14 12:49:31 +00:00
Dave Syer
7eb310066a Merge branch 'master' into 2.0.x 2017-11-14 12:48:54 +00:00
Dave Syer
4352d9a81a Add test for profiles picked up from bootstrap.properties 2017-11-14 12:47:41 +00:00
Dave Syer
d43e0ba8c1 Ignore a test and revert a Boot change to work with M6 2017-11-07 17:31:26 +00:00
Dave Syer
46ea8e5754 Merge branch 'master' into 2.0.x 2017-11-07 17:12:00 +00:00
Dave Syer
1b219b086c Tidy up compiler warnings 2017-11-07 17:06:16 +00:00
Dave Syer
49277b9e80 Merge branch 'master' into 2.0.x 2017-11-07 16:51:42 +00:00
Dave Syer
93a0365422 Prevent logging system from being pinged on context refresh
A context refresh is actually only trying to recalculate environment
properties. Spring Boot doesn't provide an explicit API for that so
we create a "mini application" to mimic the startup. There is no
need for the logging system to be touched at all, so we can try
and filter out the listeners we know might do that.

Fixes gh-260
2017-11-07 10:32:23 +00:00
Dave Syer
c7b907d9cd Destroy beans before initializing them
Fixes gh-268
2017-11-07 08:37:44 +00:00
Dave Syer
2907f2facd Uncomment ignored test and adapt to new name
Fixes gh-269 (actually fixed in Spring Boot).
2017-11-07 08:30:09 +00:00
Dave Syer
7096d6c36a More changes in Spring Boot
This time they changed the way spring.config.location is handled
so you have to repeat the default value if you want those to be
read as well.
2017-11-03 16:40:39 +00:00
Dave Syer
0d16cf0f83 Merge branch 'master' into 2.0.x 2017-11-03 14:12:27 +00:00
Dave Syer
91f60b3f4c Be more selective with the property sources in a context refresh
We need to tread a very fine line. Ideally the process of refreshing
the Environment builds it back exactly as happened on startup.
In particular we probably don't want to have things like
application.properties already there when we start the process.

This change replaces the more liberal copy of all property sources
only a select few (actually only one), paremeterized as a constant.
2017-11-03 14:01:29 +00:00
Dave Syer
b29539e865 Simplify ConfigurationPropertiesRebinder
It actually doesn't need to use the public Binder API now
because Spring Boot faithfully uses the Environment state as it is
at runtime.
2017-11-01 09:25:07 +00:00
Dave Syer
fb36b67913 Add failing test for decrypting and rebinding
See gh-269
2017-11-01 09:24:20 +00:00
Spencer Gibb
8f9dfd38e3 Update tests for 2.0.x 2017-10-30 19:19:20 -04:00
Spencer Gibb
f302c166a5 Merge branch 'master' into 2.0.x 2017-10-30 19:15:24 -04:00
Spencer Gibb
707787dc13 Adds test for bootstrap context parent closing 2017-10-30 19:13:36 -04:00
Dave Syer
942df8ed45 Remove lombok from spring-cloud-context 2017-10-24 08:49:10 +01:00
Dave Syer
801183e01b Fix nasty state bug in BootstrapApplicationListener
In Spring 5.0.0 the SpringFactoriesLoader is stateful and
BootstrapApplicationListener inadvertently modifies the state
by adding class names to a list loaded from spring.factories.

Probably harmless in most apps, but caused some tests to fail
(depending on the order they were run in).
2017-10-20 12:51:13 +01:00
Dave Syer
2fd2f99c9d Suppress use of configuration properties source in refresh 2017-10-20 11:18:30 +01:00
Dave Syer
1f28206158 Fix compiler warnings in tests 2017-10-20 08:46:36 +01:00
Dave Syer
92cabcdf1a Skip stub property sources during bootstrap
The stub property sources from a web application context do not
contain any properties so they cab't have any effect on
bootstrap. It's cleaner to leave them out of the bootstrap
application context.
2017-10-20 08:46:36 +01:00
Spencer Gibb
74d9cd3060 Trying to fix tests 2017-10-19 23:54:18 -04:00