Skip to content

Commit 8b28e11

Browse files
authored
Merge pull request #343 from domaframework/spring-boot-4
Support Spring Boot 4
2 parents 8ebd091 + 085b0be commit 8b28e11

File tree

22 files changed

+82
-88
lines changed

22 files changed

+82
-88
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# OSS support versions
5252
# https://spring.io/projects/spring-boot#support
5353
# and milestone version of the next release
54-
spring-boot-version: [ 3.4.4, 3.5.0-M3 ]
54+
spring-boot-version: [ 4.0.0-RC1, 4.0.0-SNAPSHOT ]
5555

5656
steps:
5757
- uses: actions/checkout@v5

doma-spring-boot-autoconfigure/pom.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>org.seasar.doma.boot</groupId>
1414
<artifactId>doma-spring-boot</artifactId>
15-
<version>2.5.0-SNAPSHOT</version>
15+
<version>3.0.0-SNAPSHOT</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>
1818

@@ -28,21 +28,25 @@
2828
<version>${doma.version}</version>
2929
</dependency>
3030
<dependency>
31-
<groupId>org.springframework</groupId>
32-
<artifactId>spring-jdbc</artifactId>
31+
<groupId>org.springframework.boot</groupId>
32+
<artifactId>spring-boot-autoconfigure</artifactId>
3333
</dependency>
3434
<dependency>
3535
<groupId>org.springframework.boot</groupId>
36-
<artifactId>spring-boot-autoconfigure</artifactId>
36+
<artifactId>spring-boot-jdbc</artifactId>
3737
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-data-commons</artifactId>
41+
</dependency>
3842
<dependency>
3943
<groupId>org.springframework.boot</groupId>
4044
<artifactId>spring-boot-configuration-processor</artifactId>
4145
<optional>true</optional>
4246
</dependency>
4347
<dependency>
4448
<groupId>org.springframework.boot</groupId>
45-
<artifactId>spring-boot-starter-test</artifactId>
49+
<artifactId>spring-boot-starter-jdbc-test</artifactId>
4650
<scope>test</scope>
4751
</dependency>
4852
<dependency>

doma-spring-boot-autoconfigure/src/main/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
4848
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
4949
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
50-
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
51-
import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails;
5250
import org.springframework.boot.context.properties.EnableConfigurationProperties;
5351
import org.springframework.boot.jdbc.DatabaseDriver;
52+
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
53+
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
5454
import org.springframework.context.annotation.Bean;
5555
import org.springframework.context.annotation.Configuration;
5656
import org.springframework.core.io.ResourceLoader;

doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
import org.seasar.doma.message.Message;
5252
import org.seasar.doma.slf4j.Slf4jJdbcLogger;
5353
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
54-
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
55-
import org.springframework.boot.autoconfigure.jdbc.JdbcConnectionDetails;
54+
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
55+
import org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails;
5656
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
5757
import org.springframework.boot.autoconfigure.AutoConfigurations;
5858
import org.springframework.context.annotation.Bean;

doma-spring-boot-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>org.seasar.doma.boot</groupId>
1414
<artifactId>doma-spring-boot</artifactId>
15-
<version>2.5.0-SNAPSHOT</version>
15+
<version>3.0.0-SNAPSHOT</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>
1818

doma-spring-boot-jacoco-aggregate/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.seasar.doma.boot</groupId>
99
<artifactId>doma-spring-boot</artifactId>
10-
<version>2.5.0-SNAPSHOT</version>
10+
<version>3.0.0-SNAPSHOT</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313
<artifactId>doma-spring-boot-jacoco-aggregate</artifactId>

doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/pom.xml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212
<parent>
1313
<groupId>org.seasar.doma.boot</groupId>
1414
<artifactId>doma-spring-boot-samples</artifactId>
15-
<version>2.5.0-SNAPSHOT</version>
15+
<version>3.0.0-SNAPSHOT</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>
1818

1919
<dependencies>
20-
<dependency>
21-
<groupId>org.seasar.doma</groupId>
22-
<artifactId>doma-core</artifactId>
23-
<version>${doma.version}</version>
24-
</dependency>
2520
<dependency>
2621
<groupId>org.seasar.doma</groupId>
2722
<artifactId>doma-processor</artifactId>
@@ -35,7 +30,7 @@
3530
</dependency>
3631
<dependency>
3732
<groupId>org.springframework.boot</groupId>
38-
<artifactId>spring-boot-starter-web</artifactId>
33+
<artifactId>spring-boot-starter-webmvc</artifactId>
3934
</dependency>
4035
<dependency>
4136
<groupId>org.springframework.boot</groupId>
@@ -51,7 +46,7 @@
5146

5247
<dependency>
5348
<groupId>org.springframework.boot</groupId>
54-
<artifactId>spring-boot-starter-test</artifactId>
49+
<artifactId>spring-boot-starter-webmvc-test</artifactId>
5550
<scope>test</scope>
5651
</dependency>
5752
</dependencies>

doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/pom.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>org.seasar.doma.boot</groupId>
1414
<artifactId>doma-spring-boot-samples</artifactId>
15-
<version>2.5.0-SNAPSHOT</version>
15+
<version>3.0.0-SNAPSHOT</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>
1818

@@ -30,11 +30,7 @@
3030
</dependency>
3131
<dependency>
3232
<groupId>org.springframework.boot</groupId>
33-
<artifactId>spring-boot-starter-web</artifactId>
34-
</dependency>
35-
<dependency>
36-
<groupId>com.fasterxml.jackson.datatype</groupId>
37-
<artifactId>jackson-datatype-jsr310</artifactId>
33+
<artifactId>spring-boot-starter-webmvc</artifactId>
3834
</dependency>
3935
<dependency>
4036
<groupId>com.h2database</groupId>
@@ -43,12 +39,7 @@
4339
</dependency>
4440
<dependency>
4541
<groupId>org.springframework.boot</groupId>
46-
<artifactId>spring-boot-starter-test</artifactId>
47-
<scope>test</scope>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.junit.jupiter</groupId>
51-
<artifactId>junit-jupiter</artifactId>
42+
<artifactId>spring-boot-starter-webmvc-test</artifactId>
5243
<scope>test</scope>
5344
</dependency>
5445
</dependencies>

doma-spring-boot-samples/doma-spring-boot-sample-entity-listener/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66
import java.util.List;
77

88
import org.junit.jupiter.api.Test;
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
import org.springframework.boot.resttestclient.TestRestTemplate;
11+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
912
import org.springframework.boot.test.context.SpringBootTest;
1013
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
11-
import org.springframework.boot.test.web.client.TestRestTemplate;
1214
import org.springframework.boot.test.web.server.LocalServerPort;
1315
import org.springframework.core.ParameterizedTypeReference;
1416
import org.springframework.http.HttpEntity;
1517
import org.springframework.http.HttpMethod;
1618
import org.springframework.web.util.UriComponentsBuilder;
1719

1820
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
21+
@AutoConfigureTestRestTemplate
1922
class ApplicationTest {
20-
private final TestRestTemplate restTemplate = new TestRestTemplate();
23+
@Autowired
24+
private TestRestTemplate restTemplate;
2125
private final ParameterizedTypeReference<List<Message>> typedReference = new ParameterizedTypeReference<List<Message>>() {
2226
};
2327
@LocalServerPort

doma-spring-boot-samples/doma-spring-boot-sample-event-handler/pom.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>org.seasar.doma.boot</groupId>
1414
<artifactId>doma-spring-boot-samples</artifactId>
15-
<version>2.5.0-SNAPSHOT</version>
15+
<version>3.0.0-SNAPSHOT</version>
1616
<relativePath>../pom.xml</relativePath>
1717
</parent>
1818

@@ -30,11 +30,7 @@
3030
</dependency>
3131
<dependency>
3232
<groupId>org.springframework.boot</groupId>
33-
<artifactId>spring-boot-starter-web</artifactId>
34-
</dependency>
35-
<dependency>
36-
<groupId>com.fasterxml.jackson.datatype</groupId>
37-
<artifactId>jackson-datatype-jsr310</artifactId>
33+
<artifactId>spring-boot-starter-webmvc</artifactId>
3834
</dependency>
3935
<dependency>
4036
<groupId>com.h2database</groupId>
@@ -43,12 +39,7 @@
4339
</dependency>
4440
<dependency>
4541
<groupId>org.springframework.boot</groupId>
46-
<artifactId>spring-boot-starter-test</artifactId>
47-
<scope>test</scope>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.junit.jupiter</groupId>
51-
<artifactId>junit-jupiter</artifactId>
42+
<artifactId>spring-boot-starter-webmvc-test</artifactId>
5243
<scope>test</scope>
5344
</dependency>
5445
</dependencies>

0 commit comments

Comments
 (0)