Commit Graph

259 Commits

Author SHA1 Message Date
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
cdcf42ed60 Merge branch 'master' into 2.0.x 2017-11-01 16:55:28 +00:00
Dave Syer
e388b5c4d2 Make nested ckass public
So that it is fully introspectable with BeanInfo (Java Beans).
Prevents a WARN log on startup about ambiguous write methods.
2017-11-01 16:54:16 +00:00
Dave Syer
77befcd7c5 Temporary exclusion to workaround bug in test 2017-11-01 16:53:24 +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
Spencer Gibb
449f51a748 Merge branch '1.2.x'
# Conflicts:
#	docs/pom.xml
#	pom.xml
#	spring-cloud-commons-dependencies/pom.xml
#	spring-cloud-commons/pom.xml
#	spring-cloud-context/pom.xml
#	spring-cloud-starter/pom.xml
2017-10-30 19:01:22 -04:00
Spencer Gibb
abe5374c79 Ensure parent context of bootstrap context is closed.
fixes gh-267
2017-10-30 18:56:01 -04:00
Spencer Gibb
c9e8f02188 Remove reflection hack.
All tests pass, just with the call to afterPropertiesSet()
2017-10-30 17:35:45 -04:00
Spencer Gibb
d31e7ae499 Adds reflection hack back.
Hopefully not for long.
2017-10-30 16:27:12 -04:00
buildmaster
3a780623c1 Going back to snapshots 2017-10-27 15:49:29 +00:00
buildmaster
698124544c Update SNAPSHOT to 2.0.0.M3 2017-10-27 15:48:50 +00:00
Dave Syer
ff6fa5a65d Merge branch 'master' into 2.0.x 2017-10-24 08:51:01 +01:00
Dave Syer
942df8ed45 Remove lombok from spring-cloud-context 2017-10-24 08:49:10 +01:00
Dave Syer
880c1160e6 Replace lombok logger 2017-10-24 08:43:45 +01:00
Spencer Gibb
892a6ee2bd Going back to snapshots 2017-10-20 15:45:37 -04:00
Spencer Gibb
e47a557636 Update SNAPSHOT to 1.3.0.RC1 2017-10-20 15:44:28 -04: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
Dave Syer
20dd5da52c Fix test to accommodate changed property source order 2017-10-19 13:59:13 +01:00
Dave Syer
484d68cfff Merge branch 'master' into 2.0.x 2017-10-19 13:43:12 +01:00
Dave Syer
1add1067df Fix ordering of property sources on refresh
If there were *no* bootstrapProperties (i.e. properties added by
PropertySourceLocators) on startup, and then in a refresh event
some new sources were picked up, they would have been added to the
end, instead of the beginning of the list.

Fixes https://github.com/spring-cloud/spring-cloud-config/issues/815
2017-10-19 13:41:05 +01:00
Dave Syer
ed409a6c9f Merge branch 'master' into 2.0.x 2017-10-11 08:13:04 -04:00
Dave Syer
ccf613c29c Make method accessible in GenericScope proxy target
Otherwise app crashes on first access of scoped proxy.

Fixes gh-261
2017-10-11 08:12:32 -04:00
Dave Syer
ff00aa8eee Remove verbose logging in test 2017-10-05 09:21:56 +01:00
Dave Syer
51fb39e281 Use public methods on CPBPP 2017-10-04 14:36:49 +01:00
Dave Syer
4ee42f2cf2 Merge branch 'master' into 2.0.x 2017-10-04 14:34:13 +01:00
Dave Syer
a7caee5f1f Protect refresh of single bean as well 2017-10-04 14:34:06 +01:00
Dave Syer
039c987cb1 Merge branch 'master' into 2.0.x 2017-10-04 14:21:05 +01:00
Dave Syer
c28ca5de91 Add extra concurrency test for refresh scope
The test passes (would have failed in parent commit)
because a lock is taken in the scoped proxy itself, not
in the target.
2017-10-04 14:14:45 +01:00