Moves bootstrap enabled property to refresh property source.

LegacyContextRefresher used to set `spring.cloud.bootstrap.enabled=true` as a property using the api of `SpringApplicationBuilder`. This change moves the setting of properties for refresh from ContextRefresher to LegacyContextRefresher since they are only applicable there. The bootstrap enabled propery is now set on the refresh property source rather than the api.

Fixes gh-892
This commit is contained in:
spencergibb
2021-03-15 20:27:14 -04:00
parent 5928ccd168
commit 3885af8caf
4 changed files with 17 additions and 13 deletions

View File

@@ -78,7 +78,6 @@ public class ContextRefresherTests {
}
@Test
@Ignore // FIXME: legacy
public void bootstrapPropertySourceAlwaysFirst() {
// Use spring.cloud.bootstrap.name to switch off the defaults (which would pick up
// a bootstrapProperties immediately