From 462953dce2b6a9109d56b12fc1aace0567f76d2a Mon Sep 17 00:00:00 2001 From: Toshiaki Maki Date: Tue, 4 Nov 2025 10:13:44 +0900 Subject: [PATCH 1/5] Bump to 3.0.0-SNAPSHOT --- doma-spring-boot-autoconfigure/pom.xml | 2 +- doma-spring-boot-core/pom.xml | 2 +- doma-spring-boot-jacoco-aggregate/pom.xml | 2 +- .../doma-spring-boot-sample-docker-compose/pom.xml | 2 +- .../doma-spring-boot-sample-entity-listener/pom.xml | 2 +- .../doma-spring-boot-sample-event-handler/pom.xml | 2 +- doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml | 2 +- .../doma-spring-boot-sample-testcontainers/pom.xml | 2 +- .../doma-spring-boot-sample-two-datasource/pom.xml | 2 +- .../doma-spring-boot-sample-unified-criteria/pom.xml | 2 +- doma-spring-boot-samples/pom.xml | 2 +- doma-spring-boot-starter/pom.xml | 2 +- pom.xml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doma-spring-boot-autoconfigure/pom.xml b/doma-spring-boot-autoconfigure/pom.xml index 63a4bb7..59655a3 100644 --- a/doma-spring-boot-autoconfigure/pom.xml +++ b/doma-spring-boot-autoconfigure/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-core/pom.xml b/doma-spring-boot-core/pom.xml index 7f0ca2f..c2028cb 100644 --- a/doma-spring-boot-core/pom.xml +++ b/doma-spring-boot-core/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-jacoco-aggregate/pom.xml b/doma-spring-boot-jacoco-aggregate/pom.xml index 1244b67..d5ff1a1 100644 --- a/doma-spring-boot-jacoco-aggregate/pom.xml +++ b/doma-spring-boot-jacoco-aggregate/pom.xml @@ -7,7 +7,7 @@ org.seasar.doma.boot doma-spring-boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml doma-spring-boot-jacoco-aggregate diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml index 957f983..fbe033c 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml index 2a244f7..d85ac6e 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml index deedf76..3b09426 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml index 5b1ad23..85e69ce 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml index 430b250..2e27fd6 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/pom.xml index de433c1..0ce27d1 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml index 337b756..1431505 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot-samples - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/doma-spring-boot-samples/pom.xml b/doma-spring-boot-samples/pom.xml index aab6148..64eca81 100644 --- a/doma-spring-boot-samples/pom.xml +++ b/doma-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ doma-spring-boot org.seasar.doma.boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT pom 4.0.0 diff --git a/doma-spring-boot-starter/pom.xml b/doma-spring-boot-starter/pom.xml index 5e5c6bc..33d36fe 100644 --- a/doma-spring-boot-starter/pom.xml +++ b/doma-spring-boot-starter/pom.xml @@ -12,7 +12,7 @@ org.seasar.doma.boot doma-spring-boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 5ceb114..1e83308 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.seasar.doma.boot doma-spring-boot - 2.5.0-SNAPSHOT + 3.0.0-SNAPSHOT pom doma-spring-boot From 424c333157f58f5970fa5264e6774b05bf3c3a75 Mon Sep 17 00:00:00 2001 From: Uragami Taichi Date: Tue, 5 Aug 2025 08:07:44 +0900 Subject: [PATCH 2/5] Fix compile-time warnings (excluding Javadoc-related ones) --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index 1e83308..97e9fb2 100644 --- a/pom.xml +++ b/pom.xml @@ -187,6 +187,20 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + + org.apache.maven.plugins + maven-jar-plugin + 3.4.1 + + + From d442487c49113d2a40cff6e6b5761d16d52ccc25 Mon Sep 17 00:00:00 2001 From: Toshiaki Maki Date: Tue, 4 Nov 2025 10:33:18 +0900 Subject: [PATCH 3/5] Remove unnecessary spring.provides --- .../src/main/resources/META-INF/spring.provides | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doma-spring-boot-starter/src/main/resources/META-INF/spring.provides diff --git a/doma-spring-boot-starter/src/main/resources/META-INF/spring.provides b/doma-spring-boot-starter/src/main/resources/META-INF/spring.provides deleted file mode 100644 index b85c2ae..0000000 --- a/doma-spring-boot-starter/src/main/resources/META-INF/spring.provides +++ /dev/null @@ -1 +0,0 @@ -provides: doma-spring-boot-autoconfigure \ No newline at end of file From d07b58198535a48db5a8fa08f851622601dac5e6 Mon Sep 17 00:00:00 2001 From: Toshiaki Maki Date: Tue, 4 Nov 2025 11:01:54 +0900 Subject: [PATCH 4/5] Support Spring Boot 4 --- .github/workflows/ci.yml | 2 +- doma-spring-boot-autoconfigure/pom.xml | 12 ++++++++---- .../autoconfigure/DomaAutoConfiguration.java | 4 ++-- .../autoconfigure/DomaAutoConfigurationTest.java | 4 ++-- .../pom.xml | 9 ++------- .../pom.xml | 13 ++----------- .../seasar/doma/boot/sample/ApplicationTest.java | 4 +++- .../pom.xml | 13 ++----------- .../seasar/doma/boot/sample/ApplicationTest.java | 4 +++- .../doma-spring-boot-sample-simple/pom.xml | 14 ++------------ .../seasar/doma/boot/sample/ApplicationTest.java | 4 +++- .../pom.xml | 16 ++++++++-------- .../seasar/doma/boot/sample/ApplicationTest.java | 1 - .../configuration/DataSourceConfiguration.java | 15 ++++++++------- .../pom.xml | 4 ++-- pom.xml | 2 +- 16 files changed, 49 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be6ef6d..13a8c2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: # OSS support versions # https://spring.io/projects/spring-boot#support # and milestone version of the next release - spring-boot-version: [ 3.4.4, 3.5.0-M3 ] + spring-boot-version: [ 4.0.0-RC1, 4.0.0-SNAPSHOT ] steps: - uses: actions/checkout@v5 diff --git a/doma-spring-boot-autoconfigure/pom.xml b/doma-spring-boot-autoconfigure/pom.xml index 59655a3..bea3b6a 100644 --- a/doma-spring-boot-autoconfigure/pom.xml +++ b/doma-spring-boot-autoconfigure/pom.xml @@ -28,13 +28,17 @@ ${doma.version} - org.springframework - spring-jdbc + org.springframework.boot + spring-boot-autoconfigure org.springframework.boot - spring-boot-autoconfigure + spring-boot-jdbc + + org.springframework.boot + spring-boot-data-commons + org.springframework.boot spring-boot-configuration-processor @@ -42,7 +46,7 @@ org.springframework.boot - spring-boot-starter-test + spring-boot-starter-jdbc-test test diff --git a/doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfiguration.java b/doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfiguration.java index 0b79333..1c5401e 100644 --- a/doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfiguration.java +++ b/doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfiguration.java @@ -47,10 +47,10 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.jdbc.DatabaseDriver; +import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; +import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ResourceLoader; diff --git a/doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java b/doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java index 52e0741..acd0a84 100644 --- a/doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java +++ b/doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java @@ -51,8 +51,8 @@ import org.seasar.doma.message.Message; import org.seasar.doma.slf4j.Slf4jJdbcLogger; import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails; +import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; +import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.context.annotation.Bean; diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml index fbe033c..f4fdc8f 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml @@ -17,11 +17,6 @@ - - org.seasar.doma - doma-core - ${doma.version} - org.seasar.doma doma-processor @@ -35,7 +30,7 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc org.springframework.boot @@ -51,7 +46,7 @@ org.springframework.boot - spring-boot-starter-test + spring-boot-starter-webmvc-test test diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml index d85ac6e..6d369ec 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml @@ -30,11 +30,7 @@ org.springframework.boot - spring-boot-starter-web - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 + spring-boot-starter-webmvc com.h2database @@ -43,12 +39,7 @@ org.springframework.boot - spring-boot-starter-test - test - - - org.junit.jupiter - junit-jupiter + spring-boot-starter-webmvc-test test diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index df7423d..ebe57e0 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -6,9 +6,10 @@ import java.util.List; import org.junit.jupiter.api.Test; +import org.springframework.boot.resttestclient.TestRestTemplate; +import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; @@ -16,6 +17,7 @@ import org.springframework.web.util.UriComponentsBuilder; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@AutoConfigureTestRestTemplate class ApplicationTest { private final TestRestTemplate restTemplate = new TestRestTemplate(); private final ParameterizedTypeReference> typedReference = new ParameterizedTypeReference>() { diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml index 3b09426..ad4aa91 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml @@ -30,11 +30,7 @@ org.springframework.boot - spring-boot-starter-web - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 + spring-boot-starter-webmvc com.h2database @@ -43,12 +39,7 @@ org.springframework.boot - spring-boot-starter-test - test - - - org.junit.jupiter - junit-jupiter + spring-boot-starter-webmvc-test test diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index df7423d..ebe57e0 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -6,9 +6,10 @@ import java.util.List; import org.junit.jupiter.api.Test; +import org.springframework.boot.resttestclient.TestRestTemplate; +import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; @@ -16,6 +17,7 @@ import org.springframework.web.util.UriComponentsBuilder; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@AutoConfigureTestRestTemplate class ApplicationTest { private final TestRestTemplate restTemplate = new TestRestTemplate(); private final ParameterizedTypeReference> typedReference = new ParameterizedTypeReference>() { diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml index 85e69ce..24929cc 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml @@ -17,11 +17,6 @@ - - org.seasar.doma - doma-core - ${doma.version} - org.seasar.doma doma-processor @@ -35,7 +30,7 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc com.h2database @@ -44,12 +39,7 @@ org.springframework.boot - spring-boot-starter-test - test - - - org.junit.jupiter - junit-jupiter + spring-boot-starter-webmvc-test test diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-simple/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-simple/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index 39ff69c..0ba00f0 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-simple/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-simple/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -6,9 +6,10 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.resttestclient.TestRestTemplate; +import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; @@ -16,6 +17,7 @@ import org.springframework.web.util.UriComponentsBuilder; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@AutoConfigureTestRestTemplate class ApplicationTest { @Autowired private TestRestTemplate restTemplate; diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml index 2e27fd6..06b1a75 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/pom.xml @@ -17,11 +17,6 @@ - - org.seasar.doma - doma-core - ${doma.version} - org.seasar.doma doma-processor @@ -35,7 +30,7 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc org.postgresql @@ -44,7 +39,7 @@ org.springframework.boot - spring-boot-starter-test + spring-boot-starter-webmvc-test test @@ -54,7 +49,12 @@ org.testcontainers - postgresql + testcontainers-junit-jupiter + test + + + org.testcontainers + testcontainers-postgresql test diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index 895e34e..f133e56 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-testcontainers/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -13,7 +13,6 @@ import org.springframework.context.annotation.Import; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.client.RestClient; -import org.springframework.web.util.UriComponentsBuilder; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @Import(TestcontainersConfiguration.class) diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/src/main/java/org/seasar/doma/boot/sample/configuration/DataSourceConfiguration.java b/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/src/main/java/org/seasar/doma/boot/sample/configuration/DataSourceConfiguration.java index 5eb6250..504328b 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/src/main/java/org/seasar/doma/boot/sample/configuration/DataSourceConfiguration.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/src/main/java/org/seasar/doma/boot/sample/configuration/DataSourceConfiguration.java @@ -3,10 +3,10 @@ import javax.sql.DataSource; import org.seasar.doma.boot.sample.annotation.Secondary; -import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; -import org.springframework.boot.autoconfigure.sql.init.SqlDataSourceScriptDatabaseInitializer; -import org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.jdbc.autoconfigure.ApplicationDataSourceScriptDatabaseInitializer; +import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; +import org.springframework.boot.sql.autoconfigure.init.SqlInitializationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; @@ -60,16 +60,17 @@ public SqlInitializationProperties secondarySqlInitializationProperties() { @Primary @Bean - public SqlDataSourceScriptDatabaseInitializer dataSourceInitializer(DataSource dataSource, + public ApplicationDataSourceScriptDatabaseInitializer dataSourceInitializer( + DataSource dataSource, SqlInitializationProperties properties) { - return new SqlDataSourceScriptDatabaseInitializer(dataSource, properties); + return new ApplicationDataSourceScriptDatabaseInitializer(dataSource, properties); } @Secondary @Bean - public SqlDataSourceScriptDatabaseInitializer secondaryDataSourceInitializer( + public ApplicationDataSourceScriptDatabaseInitializer secondaryDataSourceInitializer( @Secondary DataSource dataSource, @Secondary SqlInitializationProperties properties) { - return new SqlDataSourceScriptDatabaseInitializer(dataSource, properties); + return new ApplicationDataSourceScriptDatabaseInitializer(dataSource, properties); } } diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml index 1431505..4c60081 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml +++ b/doma-spring-boot-samples/doma-spring-boot-sample-unified-criteria/pom.xml @@ -24,7 +24,7 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc com.h2database @@ -33,7 +33,7 @@ org.springframework.boot - spring-boot-starter-test + spring-boot-starter-webmvc-test test diff --git a/pom.xml b/pom.xml index 97e9fb2..7dbc0d4 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 17 17 3.11.0 - 3.3.10 + 4.0.0-RC1 3.3.1 3.12.0 1.7.0 From 0e3fad9c8bcf73031b9ef2f469986a168e5c9a4a Mon Sep 17 00:00:00 2001 From: Toshiaki Maki Date: Tue, 4 Nov 2025 11:41:38 +0900 Subject: [PATCH 5/5] Autowire TestRestTemplate for consistency --- .../java/org/seasar/doma/boot/sample/ApplicationTest.java | 4 +++- .../java/org/seasar/doma/boot/sample/ApplicationTest.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index ebe57e0..09c8a8e 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -6,6 +6,7 @@ import java.util.List; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.resttestclient.TestRestTemplate; import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; @@ -19,7 +20,8 @@ @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @AutoConfigureTestRestTemplate class ApplicationTest { - private final TestRestTemplate restTemplate = new TestRestTemplate(); + @Autowired + private TestRestTemplate restTemplate; private final ParameterizedTypeReference> typedReference = new ParameterizedTypeReference>() { }; @LocalServerPort diff --git a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java index ebe57e0..09c8a8e 100644 --- a/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java +++ b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java @@ -6,6 +6,7 @@ import java.util.List; import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.resttestclient.TestRestTemplate; import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; import org.springframework.boot.test.context.SpringBootTest; @@ -19,7 +20,8 @@ @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @AutoConfigureTestRestTemplate class ApplicationTest { - private final TestRestTemplate restTemplate = new TestRestTemplate(); + @Autowired + private TestRestTemplate restTemplate; private final ParameterizedTypeReference> typedReference = new ParameterizedTypeReference>() { }; @LocalServerPort