diff --git a/docs/src/main/asciidoc/spring-cloud-config.adoc b/docs/src/main/asciidoc/spring-cloud-config.adoc index 1f634393..af52458e 100644 --- a/docs/src/main/asciidoc/spring-cloud-config.adoc +++ b/docs/src/main/asciidoc/spring-cloud-config.adoc @@ -1833,6 +1833,15 @@ spring.config.import=optional:configserver: This will connect to the Config Server at the default location of "http://localhost:8888". Removing the `optional:` prefix will cause the Config Client to fail if it is unable to connect to Config Server. To change the location of Config Server either set `spring.cloud.config.uri` or add the url to the `spring.config.import` statement such as, `spring.config.import=optional:configserver:http://myhost:8888`. The location in the import property has precedence over the uri property. +Spring Boot Config Data resolves configuration in a two step process. First it loads all configuration using the `default` +profile. This allows Spring Boot to gather all configuration which may activate any additional profiles. +After it has gathered all activated profiles it will load any additional configuration for the active profiles. +Due to this you may see multiple requests being made to the Spring Cloud Config Server to fetch configuration. This +is normal and is a side effect of how Spring Boot loads configuration when using `spring.config.import`. In previous +versions of Spring Cloud Config there was only a single request made but this meant you could not activate profiles +from configuration coming from the Config Server. The additional request with just the 'default` profile now makes +this possible. + NOTE: A `bootstrap` file (properties or yaml) is *not* needed for the Spring Boot Config Data method of import via `spring.config.import`. [[config-first-bootstrap]] diff --git a/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingVaultIntegrationTests.java b/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingVaultIntegrationTests.java index f4d8cb6a..7d5f104a 100644 --- a/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingVaultIntegrationTests.java +++ b/spring-cloud-config-sample/src/test/java/sample/ConfigDataOrderingVaultIntegrationTests.java @@ -53,7 +53,7 @@ public class ConfigDataOrderingVaultIntegrationTests { private static ConfigurableApplicationContext server; @Container - public static VaultContainer vaultContainer = new VaultContainer<>(DockerImageName.parse("vault")) + public static VaultContainer vaultContainer = new VaultContainer<>(DockerImageName.parse("vault:1.13.3")) .withVaultToken("my-root-token").withClasspathResourceMapping("vaultordering/vault_test_policy.txt", "/tmp/vault_test_policy.txt", BindMode.READ_ONLY);