diff --git a/aws-parameterstore-project/src/test/java/com/example/awsspring/TestApplication.java b/aws-parameterstore-project/src/test/java/com/example/awsspring/TestApplication.java index e95dac8a..c3a6a95e 100644 --- a/aws-parameterstore-project/src/test/java/com/example/awsspring/TestApplication.java +++ b/aws-parameterstore-project/src/test/java/com/example/awsspring/TestApplication.java @@ -13,7 +13,7 @@ public class TestApplication { @Bean @ServiceConnection PostgreSQLContainer sqlContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.0-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.2-alpine")); } public static void main(String[] args) { diff --git a/aws-parameterstore-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java b/aws-parameterstore-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java index c9e7e384..e2469833 100644 --- a/aws-parameterstore-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java +++ b/aws-parameterstore-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java @@ -14,7 +14,7 @@ public class LocalStackContainerConfig { @Container private static final LocalStackContainer localStackContainer = - new LocalStackContainer(DockerImageName.parse("localstack/localstack").withTag("3.7.2")) + new LocalStackContainer(DockerImageName.parse("localstack/localstack").withTag("4.0.3")) .withCopyFileToContainer( MountableFile.forHostPath("localstack/"), "/etc/localstack/init/ready.d/") diff --git a/aws-secretmanager-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java b/aws-secretmanager-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java index f93eb5dc..712977dd 100644 --- a/aws-secretmanager-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java +++ b/aws-secretmanager-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Configuration; +import org.springframework.lang.NonNull; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -11,7 +12,7 @@ public class WebMvcConfig implements WebMvcConfigurer { private final ApplicationProperties properties; @Override - public void addCorsMappings(CorsRegistry registry) { + public void addCorsMappings(@NonNull CorsRegistry registry) { registry.addMapping(properties.getCors().getPathPattern()) .allowedMethods(properties.getCors().getAllowedMethods()) .allowedHeaders(properties.getCors().getAllowedHeaders()) diff --git a/aws-secretmanager-project/src/test/java/com/example/awsspring/TestApplication.java b/aws-secretmanager-project/src/test/java/com/example/awsspring/TestApplication.java index 21a4c6a5..142c6bb9 100644 --- a/aws-secretmanager-project/src/test/java/com/example/awsspring/TestApplication.java +++ b/aws-secretmanager-project/src/test/java/com/example/awsspring/TestApplication.java @@ -19,7 +19,7 @@ public class TestApplication { @ServiceConnection LocalStackContainer localStackContainer() { return new LocalStackContainer( - DockerImageName.parse("localstack/localstack").withTag("3.7.2")) + DockerImageName.parse("localstack/localstack").withTag("4.0.3")) .withCopyFileToContainer( MountableFile.forHostPath("localstack/"), "/etc/localstack/init/ready.d/") .waitingFor(Wait.forLogMessage(".*LocalStack initialized successfully\n", 1)); diff --git a/aws-secretmanager-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java b/aws-secretmanager-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java index d34701d5..76b8d52a 100644 --- a/aws-secretmanager-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java +++ b/aws-secretmanager-project/src/test/java/com/example/awsspring/common/LocalStackContainerConfig.java @@ -14,7 +14,7 @@ public class LocalStackContainerConfig { @Container private static final LocalStackContainer localStackContainer = - new LocalStackContainer(DockerImageName.parse("localstack/localstack").withTag("3.7.1")) + new LocalStackContainer(DockerImageName.parse("localstack/localstack").withTag("4.0.3")) .withCopyFileToContainer( MountableFile.forHostPath("localstack/"), "/etc/localstack/init/ready.d/") diff --git a/aws-secretmanager-project/src/test/java/com/example/awsspring/repositories/SchemaValidationTest.java b/aws-secretmanager-project/src/test/java/com/example/awsspring/repositories/SchemaValidationTest.java index 9c1fa0a9..e80bea2d 100644 --- a/aws-secretmanager-project/src/test/java/com/example/awsspring/repositories/SchemaValidationTest.java +++ b/aws-secretmanager-project/src/test/java/com/example/awsspring/repositories/SchemaValidationTest.java @@ -7,13 +7,10 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; -import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase.Replace; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.boot.testcontainers.context.ImportTestcontainers; @DataJpaTest(properties = "spring.jpa.hibernate.ddl-auto=validate") -@AutoConfigureTestDatabase(replace = Replace.NONE) @ImportTestcontainers(DBTestContainer.class) class SchemaValidationTest { diff --git a/aws-ses-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java b/aws-ses-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java index f93eb5dc..712977dd 100644 --- a/aws-ses-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java +++ b/aws-ses-project/src/main/java/com/example/awsspring/config/WebMvcConfig.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Configuration; +import org.springframework.lang.NonNull; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -11,7 +12,7 @@ public class WebMvcConfig implements WebMvcConfigurer { private final ApplicationProperties properties; @Override - public void addCorsMappings(CorsRegistry registry) { + public void addCorsMappings(@NonNull CorsRegistry registry) { registry.addMapping(properties.getCors().getPathPattern()) .allowedMethods(properties.getCors().getAllowedMethods()) .allowedHeaders(properties.getCors().getAllowedHeaders()) diff --git a/aws-ses-project/src/test/java/com/example/awsspring/common/LocalStackTestContainer.java b/aws-ses-project/src/test/java/com/example/awsspring/common/LocalStackTestContainer.java index f127d887..a196e2af 100644 --- a/aws-ses-project/src/test/java/com/example/awsspring/common/LocalStackTestContainer.java +++ b/aws-ses-project/src/test/java/com/example/awsspring/common/LocalStackTestContainer.java @@ -17,7 +17,7 @@ public class LocalStackTestContainer { LocalStackContainer localStackContainer() { LocalStackContainer localStackContainer = new LocalStackContainer( - DockerImageName.parse("localstack/localstack").withTag("3.7.2")); + DockerImageName.parse("localstack/localstack").withTag("4.0.3")); localStackContainer.start(); Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(log); localStackContainer.followOutput(logConsumer);