Commit Graph

195 Commits

Author SHA1 Message Date
Spencer Gibb
fb76beb3f2 Test for NPE when calling getClass() in RefreshScope
fixes gh-297
2017-12-20 17:55:25 -05:00
Spencer Gibb
464624e375 Avoids potential NPE when calling getClass() in RefreshScope
fixes gh-297
2017-12-20 11:57:40 -05:00
Dave Syer
8a0261f275 Test for AOP proxy generally, not just CGlib
Fixes gh-288, closes gh-289
2017-12-15 16:19:48 +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
259aa437d7 Allow refresh auto config to be disabled by property.
fixes gh-276
2017-11-28 19:57:54 -05:00
Ryan Baxter
924d870081 Bumping versions to 1.3.1.BUILD-SNAPSHOT after release 2017-11-20 14:17:02 -05:00
Ryan Baxter
75d30e1847 Going back to snapshots 2017-11-20 14:17:01 -05:00
Ryan Baxter
695739d7a0 Update SNAPSHOT to 1.3.0.RELEASE 2017-11-20 14:14:04 -05:00
Misagh Moayyed
4868cd3183 Update PropertySourceBootstrapProperties.java (#274) 2017-11-16 12:42:45 -05:00
Spencer Gibb
1bd2c3112a Make sure cli args are copied to bootstrap. 2017-11-14 11:11:12 -05:00
Dave Syer
4352d9a81a Add test for profiles picked up from bootstrap.properties 2017-11-14 12:47:41 +00:00
Dave Syer
1b219b086c Tidy up compiler warnings 2017-11-07 17:06:16 +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
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
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
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
Dave Syer
942df8ed45 Remove lombok from spring-cloud-context 2017-10-24 08:49:10 +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
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
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
a7caee5f1f Protect refresh of single bean as well 2017-10-04 14:34:06 +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
Ryan Baxter
deb18d2eb9 Bumping versions to 1.2.5.BUILD-SNAPSHOT after release 2017-10-02 14:25:47 -04:00
Ryan Baxter
3c05d9754c Going back to snapshots 2017-10-02 14:25:47 -04:00
Ryan Baxter
714747d240 Update SNAPSHOT to 1.2.4.RELEASE 2017-10-02 14:23:03 -04:00
Ryan Baxter
6ae5e0bec8 Going back to snapshots 2017-08-24 16:03:50 -04:00
Ryan Baxter
e6e5de275d Update SNAPSHOT to 1.3.0.M1 2017-08-24 16:02:42 -04:00
Biju Kunjummen
5aaafb19af Replaces deprecated o.s.b.a.PropertyPlaceholderAutoConfiguration 2017-08-21 20:35:45 -07:00
Biju Kunjummen
a6b7f70b8e Show better message for missing config keystore props (#232)
* Show better message for missing config keystore props

* Removes unused ExpectedException

Fixes #230
2017-08-04 15:53:35 -04:00
Johannes Edmeier
94a42737ec Fix empty keys in EnvironmentChangedEvent on resetting the Environment (#229)
When the Environment is resetted the EnvironmentChangedEvent always
contains an empty keySet, since the live view of the cleared map was
used. This commit fixes this.
2017-07-25 11:58:15 -04:00
Ryan Baxter
e8a42e500e Bumping versions to 1.2.4.BUILD-SNAPSHOT after release 2017-07-12 14:04:38 -04:00
Ryan Baxter
9a1c1bf634 Going back to snapshots 2017-07-12 14:04:38 -04:00
Ryan Baxter
7a9225619c Update SNAPSHOT to 1.2.3.RELEASE 2017-07-12 14:03:27 -04:00
Spencer Gibb
2aa6c39322 Reinstate @ConditionalOnClass(EnvironmentEndpoint.class) 2017-06-30 20:19:35 -06:00
Spencer Gibb
c75673110b formatting 2017-06-30 17:47:08 -06:00
Fabio Matos
2e81db24cf Disables endpoint creation (#208)
Fixes gh-117
2017-06-30 19:38:03 -04:00
Spencer Gibb
2b6ad4a118 bump to version 1.3.0 2017-06-30 17:19:48 -06:00
Spencer Gibb
0c041591d1 Bump to version 1.2.3.BUILD-SNAPSHOT 2017-05-19 14:59:52 -06:00
Spencer Gibb
6cfaea4bb7 Going back to snapshots 2017-05-19 14:57:35 -06:00
Spencer Gibb
79096fbf8d Update SNAPSHOT to 1.2.2.RELEASE 2017-05-19 14:54:42 -06:00
Jon Schneider
c02398959d Revert back to snapshots 2017-05-12 10:25:38 -05:00
Jon Schneider
9d53dd46bb Update SNAPSHOT to 1.2.1.RELEASE 2017-05-12 09:18:36 -05:00
Spencer Gibb
922608651a fix test path 2017-05-01 09:27:37 -06:00
Spencer Gibb
9675df02f6 Bumping versions to 1.2.1.BUILD-SNAPSHOT after release 2017-04-05 14:19:30 -06:00
Spencer Gibb
72685376a9 Going back to snapshots 2017-04-05 14:19:29 -06:00
Spencer Gibb
6b30820b09 Update SNAPSHOT to 1.2.0.RELEASE 2017-04-05 14:16:21 -06:00
Spencer Gibb
43fe59489e Update test jar inclusion 2017-04-05 12:34:37 -06:00