diff --git a/r2dbc/boot-jooq-r2dbc-sample/docker/docker-compose.yml b/r2dbc/boot-jooq-r2dbc-sample/docker/docker-compose.yml index 1e44c31ed..307aefc32 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/docker/docker-compose.yml +++ b/r2dbc/boot-jooq-r2dbc-sample/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.6-alpine + image: postgres:17.2-alpine environment: - POSTGRES_USER=appuser - POSTGRES_PASSWORD=secret diff --git a/r2dbc/boot-jooq-r2dbc-sample/pom.xml b/r2dbc/boot-jooq-r2dbc-sample/pom.xml index 94d2f4dc4..36caa13bf 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/pom.xml +++ b/r2dbc/boot-jooq-r2dbc-sample/pom.xml @@ -214,7 +214,7 @@ MYSQL: mysql:8.0.33 MARIADB: mariadb:10.11 --> - <containerImage>postgres:16.3-alpine</containerImage> + <containerImage>postgres:17.2-alpine</containerImage> </database> <flyway> <!-- @@ -332,7 +332,7 @@ <configuration> <java> <googleJavaFormat> - <version>1.22.0</version> + <version>1.25.0</version> <style>AOSP</style> </googleJavaFormat> </java> diff --git a/r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/Application.java b/r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/JooqR2dbcApplication.java similarity index 84% rename from r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/Application.java rename to r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/JooqR2dbcApplication.java index c509e7b76..b599a2b27 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/Application.java +++ b/r2dbc/boot-jooq-r2dbc-sample/src/main/java/com/example/jooq/r2dbc/JooqR2dbcApplication.java @@ -8,9 +8,9 @@ @SpringBootApplication(exclude = {JooqAutoConfiguration.class}) @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class JooqR2dbcApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(JooqR2dbcApplication.class, args); } } diff --git a/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestJooqR2dbcApplication.java b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestJooqR2dbcApplication.java new file mode 100644 index 000000000..05b43e6d7 --- /dev/null +++ b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestJooqR2dbcApplication.java @@ -0,0 +1,11 @@ +package com.example.jooq.r2dbc; + +import com.example.jooq.r2dbc.common.ContainerConfig; +import org.springframework.boot.SpringApplication; + +class TestJooqR2dbcApplication { + + public static void main(String[] args) { + SpringApplication.from(JooqR2dbcApplication::main).with(ContainerConfig.class).run(args); + } +} diff --git a/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/AbstractIntegrationTest.java b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/AbstractIntegrationTest.java index df39f5291..aea51966a 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/AbstractIntegrationTest.java +++ b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/AbstractIntegrationTest.java @@ -3,7 +3,6 @@ import static com.example.jooq.r2dbc.utils.AppConstants.PROFILE_TEST; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; -import com.example.jooq.r2dbc.TestApplication; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; @@ -12,7 +11,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; @ActiveProfiles({PROFILE_TEST}) -@SpringBootTest(webEnvironment = RANDOM_PORT, classes = TestApplication.class) +@SpringBootTest(webEnvironment = RANDOM_PORT, classes = ContainerConfig.class) @AutoConfigureWebTestClient public abstract class AbstractIntegrationTest { diff --git a/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestApplication.java b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/ContainerConfig.java similarity index 72% rename from r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestApplication.java rename to r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/ContainerConfig.java index 2ef71c121..73e047cab 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/TestApplication.java +++ b/r2dbc/boot-jooq-r2dbc-sample/src/test/java/com/example/jooq/r2dbc/common/ContainerConfig.java @@ -1,6 +1,5 @@ -package com.example.jooq.r2dbc; +package com.example.jooq.r2dbc.common; -import org.springframework.boot.SpringApplication; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -9,18 +8,14 @@ import org.testcontainers.utility.MountableFile; @TestConfiguration(proxyBeanMethods = false) -public class TestApplication { +public class ContainerConfig { @Bean @ServiceConnection PostgreSQLContainer<?> postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.3-alpine")) + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.2-alpine")) .withCopyFileToContainer( MountableFile.forClasspathResource("init.sql"), "/docker-entrypoint-initdb.d/init.sql"); } - - public static void main(String[] args) { - SpringApplication.from(Application::main).with(TestApplication.class).run(args); - } } diff --git a/r2dbc/boot-r2dbc-sample/docker/docker-compose.yml b/r2dbc/boot-r2dbc-sample/docker/docker-compose.yml index a7fe70c44..912de24c1 100644 --- a/r2dbc/boot-r2dbc-sample/docker/docker-compose.yml +++ b/r2dbc/boot-r2dbc-sample/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: postgresqldb: - image: postgres:16.6-alpine + image: postgres:17.2-alpine hostname: postgresqldb extra_hosts: [ 'host.docker.internal:host-gateway' ] environment: diff --git a/r2dbc/boot-r2dbc-sample/pom.xml b/r2dbc/boot-r2dbc-sample/pom.xml index 836bf6906..c21a0bd6f 100644 --- a/r2dbc/boot-r2dbc-sample/pom.xml +++ b/r2dbc/boot-r2dbc-sample/pom.xml @@ -310,7 +310,7 @@ <configuration> <java> <googleJavaFormat> - <version>1.22.0</version> + <version>1.25.0</version> <style>AOSP</style> </googleJavaFormat> <importOrder/> diff --git a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/Application.java b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/R2dbcApplication.java similarity index 82% rename from r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/Application.java rename to r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/R2dbcApplication.java index 12f12a3e8..d98c7a291 100644 --- a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/Application.java +++ b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/R2dbcApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class R2dbcApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(R2dbcApplication.class, args); } } diff --git a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestR2dbcApplication.java b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestR2dbcApplication.java new file mode 100644 index 000000000..e110bfaf8 --- /dev/null +++ b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestR2dbcApplication.java @@ -0,0 +1,11 @@ +package com.example.bootr2dbc; + +import com.example.bootr2dbc.common.ContainerConfig; +import org.springframework.boot.SpringApplication; + +public class TestR2dbcApplication { + + public static void main(String[] args) { + SpringApplication.from(R2dbcApplication::main).with(ContainerConfig.class).run(args); + } +} diff --git a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/AbstractIntegrationTest.java b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/AbstractIntegrationTest.java index 43dd5598e..392e431da 100644 --- a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/AbstractIntegrationTest.java +++ b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/AbstractIntegrationTest.java @@ -3,7 +3,6 @@ import static com.example.bootr2dbc.utils.AppConstants.PROFILE_TEST; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; -import com.example.bootr2dbc.TestApplication; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; import org.springframework.boot.test.context.SpringBootTest; @@ -13,7 +12,7 @@ @ActiveProfiles({PROFILE_TEST}) @SpringBootTest( webEnvironment = RANDOM_PORT, - classes = {TestApplication.class}) + classes = {ContainerConfig.class}) @AutoConfigureWebTestClient public abstract class AbstractIntegrationTest { diff --git a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestApplication.java b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/ContainerConfig.java similarity index 64% rename from r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestApplication.java rename to r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/ContainerConfig.java index 4430f0eb5..1749b4f88 100644 --- a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/TestApplication.java +++ b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/common/ContainerConfig.java @@ -1,6 +1,5 @@ -package com.example.bootr2dbc; +package com.example.bootr2dbc.common; -import org.springframework.boot.SpringApplication; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -8,15 +7,11 @@ import org.testcontainers.utility.DockerImageName; @TestConfiguration(proxyBeanMethods = false) -public class TestApplication { +public class ContainerConfig { @Bean @ServiceConnection PostgreSQLContainer<?> postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.3-alpine")); - } - - public static void main(String[] args) { - SpringApplication.from(Application::main).with(TestApplication.class).run(args); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.2-alpine")); } }