diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index be6ef6d6..13a8c2a2 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 63a4bb74..bea3b6a1 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
@@ -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 0b79333b..1c5401ee 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 52e0741a..acd0a842 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-core/pom.xml b/doma-spring-boot-core/pom.xml
index 7f0ca2fa..c2028cb0 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 1244b673..d5ff1a10 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 957f983d..f4fdc8f7 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,16 +12,11 @@
org.seasar.doma.boot
doma-spring-boot-samples
- 2.5.0-SNAPSHOT
+ 3.0.0-SNAPSHOT
../pom.xml
-
- 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 2a244f77..6d369ecc 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
@@ -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 df7423d4..09c8a8e0 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,11 @@
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;
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,8 +18,10 @@
import org.springframework.web.util.UriComponentsBuilder;
@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/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml
index deedf760..ad4aa912 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
@@ -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 df7423d4..09c8a8e0 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,11 @@
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;
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,8 +18,10 @@
import org.springframework.web.util.UriComponentsBuilder;
@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-simple/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-simple/pom.xml
index 5b1ad237..24929cc2 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,16 +12,11 @@
org.seasar.doma.boot
doma-spring-boot-samples
- 2.5.0-SNAPSHOT
+ 3.0.0-SNAPSHOT
../pom.xml
-
- 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 39ff69cf..0ba00f0d 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 430b2505..06b1a756 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,16 +12,11 @@
org.seasar.doma.boot
doma-spring-boot-samples
- 2.5.0-SNAPSHOT
+ 3.0.0-SNAPSHOT
../pom.xml
-
- 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 895e34e2..f133e56a 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/pom.xml b/doma-spring-boot-samples/doma-spring-boot-sample-two-datasource/pom.xml
index de433c10..0ce27d11 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-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 5eb62501..504328b7 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 337b7565..4c600811 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
@@ -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/doma-spring-boot-samples/pom.xml b/doma-spring-boot-samples/pom.xml
index aab61485..64eca816 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 5e5c6bc9..33d36fe1 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/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 b85c2ae0..00000000
--- 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
diff --git a/pom.xml b/pom.xml
index fd52e991..853a4b1b 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
@@ -48,7 +48,7 @@
17
17
3.11.1
- 3.3.10
+ 4.0.0-RC1
3.3.1
3.12.0
1.7.0
@@ -187,6 +187,20 @@
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.4.1
+
+
+