From cb69d4585df2538c46e8b6065e43faaba4aa6ce9 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Wed, 22 Jan 2025 04:26:40 +0800 Subject: [PATCH 1/2] Fix typo (#2711) Signed-off-by: Yanming Zhou --- docs/modules/ROOT/pages/client.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/client.adoc b/docs/modules/ROOT/pages/client.adoc index dc9ebb0f..9edc9dfc 100644 --- a/docs/modules/ROOT/pages/client.adoc +++ b/docs/modules/ROOT/pages/client.adoc @@ -25,7 +25,7 @@ After it has gathered all activated profiles it will load any additional configu 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 +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`. From 122c792d3a80bf8c7d89b0a228b7f0ea0eee0405 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Thu, 23 Jan 2025 16:41:42 -0500 Subject: [PATCH 2/2] Upgrade Localstack to 4.0.3 --- .../cloud/config/server/AwsS3IntegrationTests.java | 2 +- .../AwsParameterStoreEnvironmentRepositoryTests.java | 10 +++++++--- .../environment/AwsS3EnvironmentRepositoryTests.java | 2 +- .../AwsSecretsManagerEnvironmentRepositoryTests.java | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java index da5e0ad1..475a9a4a 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/AwsS3IntegrationTests.java @@ -64,7 +64,7 @@ public class AwsS3IntegrationTests { @Container static LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:1.3.1")) + DockerImageName.parse("localstack/localstack:4.0.3")) .withServices(LocalStackContainer.Service.S3); private static ConfigurableApplicationContext server; diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsParameterStoreEnvironmentRepositoryTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsParameterStoreEnvironmentRepositoryTests.java index aca71887..9c74002d 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsParameterStoreEnvironmentRepositoryTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsParameterStoreEnvironmentRepositoryTests.java @@ -63,7 +63,7 @@ public class AwsParameterStoreEnvironmentRepositoryTests { @Container private static final LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:1.3.1")) + DockerImageName.parse("localstack/localstack:4.0.3")) .withServices(SSM); private final StaticCredentialsProvider staticCredentialsProvider = StaticCredentialsProvider @@ -700,8 +700,12 @@ public class AwsParameterStoreEnvironmentRepositoryTests { String path = StringUtils.delete(ps.getName(), environmentProperties.getOrigin()); Set parameters = getParameters(ps, path, withSlashesForPropertyName); parameters.forEach(value -> { - ssmClient.putParameter( - PutParameterRequest.builder().name(value.name()).dataType("text").value(value.value()).build()); + ssmClient.putParameter(PutParameterRequest.builder() + .name(value.name()) + .type("String") + .dataType("text") + .value(value.value()) + .build()); toBeRemoved.add(value.name()); }); } diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java index 56d802d0..89f3ba96 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java @@ -58,7 +58,7 @@ public class AwsS3EnvironmentRepositoryTests { @Container private static final LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:1.3.1")) + DockerImageName.parse("localstack/localstack:4.0.3")) .withServices(S3); private final ConfigServerProperties server = new ConfigServerProperties(); diff --git a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsSecretsManagerEnvironmentRepositoryTests.java b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsSecretsManagerEnvironmentRepositoryTests.java index eb187484..ee5f61ac 100644 --- a/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsSecretsManagerEnvironmentRepositoryTests.java +++ b/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsSecretsManagerEnvironmentRepositoryTests.java @@ -65,7 +65,7 @@ public class AwsSecretsManagerEnvironmentRepositoryTests { @Container private static final LocalStackContainer localstack = new LocalStackContainer( - DockerImageName.parse("localstack/localstack:1.3.1")) + DockerImageName.parse("localstack/localstack:4.0.3")) .withServices(SECRETSMANAGER); private static final Log log = LogFactory.getLog(AwsSecretsManagerEnvironmentRepository.class);