Take care with order of property sources in /refresh endpoint
It's kind of a corner case, but not a very small corner: if a /refresh
leads to a change in a key that was overridden from its default value (e.g.
n a profile-specific config file) then the key is not identified as changed.
The change is still applied.
This commit fixes the key computation and adds a couple of tests.
Fixes gh-73
@ -68,8 +71,8 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@@ -68,8 +71,8 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@ -81,23 +84,33 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@@ -81,23 +84,33 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@ -118,16 +131,15 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@@ -118,16 +131,15 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
}
}
// Don't use ConfigurableEnvironment.merge() in case there are clashes with property source names
// Don't use ConfigurableEnvironment.merge() in case there are clashes with property
@ -171,9 +183,13 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@@ -171,9 +183,13 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@ -182,8 +198,12 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {
@@ -182,8 +198,12 @@ public class RefreshEndpoint extends AbstractEndpoint<Collection<String>> {