Skip to content

Commit d6baca4

Browse files
authored
Merge pull request #894 from tokuhirom/boot3
Upgrade to Spring Boot3
2 parents 1f01e77 + 35712b8 commit d6baca4

File tree

30 files changed

+58
-50
lines changed

30 files changed

+58
-50
lines changed

.github/workflows/gradle.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
java: [ '8', '11', '17' ] # We want to test on LTSs.
20+
java: [ '17' ] # We want to test on LTSs.
2121
steps:
2222
- name: actions/setup-java@v3 (JDK ${{ matrix.java }})
2323
uses: actions/setup-java@v3
@@ -38,11 +38,11 @@ jobs:
3838
runs-on: ubuntu-latest
3939
timeout-minutes: 10
4040
steps:
41-
- name: actions/setup-java@v3 (JDK 1.8)
41+
- name: actions/setup-java@v3 (JDK 17)
4242
uses: actions/setup-java@v3
4343
with:
4444
distribution: 'temurin'
45-
java-version: 8
45+
java-version: 17
4646
architecture: x64
4747
- uses: actions/checkout@v3
4848
- run: |
@@ -56,11 +56,11 @@ jobs:
5656
runs-on: ubuntu-latest
5757
timeout-minutes: 10
5858
steps:
59-
- name: actions/setup-java@v3 (JDK 1.8)
59+
- name: actions/setup-java@v3 (JDK 1.17)
6060
uses: actions/setup-java@v3
6161
with:
6262
distribution: 'temurin'
63-
java-version: 8
63+
java-version: 17
6464
architecture: x64
6565
- uses: actions/checkout@v3
6666
- run: |
@@ -75,11 +75,11 @@ jobs:
7575
runs-on: ubuntu-latest
7676
timeout-minutes: 10
7777
steps:
78-
- name: actions/setup-java@v3 (JDK 1.8)
78+
- name: actions/setup-java@v3 (JDK 17)
7979
uses: actions/setup-java@v3
8080
with:
8181
distribution: 'temurin'
82-
java-version: 8
82+
java-version: 17
8383
architecture: x64
8484
- uses: actions/checkout@v3
8585
- run: |

.github/workflows/pom-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
java: [ '8', '11', '17' ] # We want to test on LTSs.
11+
java: [ '17' ] # We want to test on LTSs.
1212
steps:
1313
- name: actions/setup-java@v3 (JDK ${{ matrix.java }})
1414
uses: actions/setup-java@v3

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ plugins {
2626
signing
2727
id("org.jetbrains.kotlin.jvm") version "1.8.10" apply false
2828
id("com.github.spotbugs") version "5.0.13" apply false
29-
id("org.springframework.boot") version "2.7.8" apply false
29+
id("org.springframework.boot") version "3.0.2" apply false
3030
id("io.freefair.lombok") version "6.6.1"
3131
}
3232

@@ -57,8 +57,8 @@ subprojects {
5757
}
5858

5959
java {
60-
sourceCompatibility = JavaVersion.VERSION_1_8
61-
targetCompatibility = JavaVersion.VERSION_1_8
60+
sourceCompatibility = JavaVersion.VERSION_17
61+
targetCompatibility = JavaVersion.VERSION_17
6262
}
6363

6464
group = rootProject.group

config/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
<module name="UnusedImports" />
150150
<module name="ImportOrder">
151151
<property name="groups"
152-
value="java,javax,org,android,net,/^com\.(?!linecorp\.|nhn\.|nhncorp\.).*$/,com.linecorp,com.nhn,com.nhncorp,jp.naver" />
152+
value="java,javax,jakarta,org,android,net,/^com\.(?!linecorp\.|nhn\.|nhncorp\.).*$/,com.linecorp,com.nhn,com.nhncorp,jp.naver" />
153153
<property name="ordered" value="true" />
154154
<property name="separated" value="true" />
155155
<property name="option" value="top" />

gradle/libs.versions.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jackson-module-parameter-names = { module = "com.fasterxml.jackson.module:jackso
2929

3030
findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
3131

32-
javax-servlet-api = { module = "javax.servlet:javax.servlet-api", version = "4.0.1" }
32+
jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version = "6.0.0" }
33+
jakarta-annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version = "2.1.1" }
3334

3435
# logging
3536
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
@@ -47,8 +48,9 @@ commons-io = { module = "commons-io:commons-io", version = "2.11.0" }
4748
reflections = { module = "org.reflections:reflections", version = "0.10.2" }
4849
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
4950
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
50-
spring-test = { module = "org.springframework:spring-test", version = "5.3.25" }
51-
wiremock = { group = "com.github.tomakehurst", name = "wiremock-jre8", version = "2.35.0" }
51+
spring-test = { module = "org.springframework:spring-test", version = "6.0.4" }
52+
# https://github.com/wiremock/wiremock/issues/1760
53+
wiremock = { group = "com.github.tomakehurst", name = "wiremock", version = "3.0.0-beta-2" }
5254

5355

5456
[bundles]

line-bot-api-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dependencies {
5959
testImplementation(libs.wiremock)
6060
testImplementation(libs.bundles.tests)
6161
testImplementation(libs.jul.to.slf4j)
62+
testImplementation(libs.guava)
6263

6364
integrationTestImplementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
6465
integrationTestCompileOnly(libs.lombok)

line-bot-api-client/src/integrationTest/java/com/linecorp/bot/client/RetryableLineMessagingClientImplIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void broadcastWithRetryKey() throws Exception {
7878
new Broadcast(new TextMessage(message), false)
7979
).get()
8080
).isInstanceOf(ExecutionException.class)
81-
.getCause()
81+
.cause()
8282
.isInstanceOf(ConflictException.class);
8383
}
8484

@@ -103,7 +103,7 @@ public void multicastWithRetryKey() throws Exception {
103103
false)
104104
).get()
105105
).isInstanceOf(ExecutionException.class)
106-
.getCause()
106+
.cause()
107107
.isInstanceOf(ConflictException.class);
108108
}
109109

@@ -126,7 +126,7 @@ public void pushMessageWithRetryKey() throws Exception {
126126
new PushMessage(settings.getUserId(), new TextMessage(message), true)
127127
).get()
128128
).isInstanceOf(ExecutionException.class)
129-
.getCause()
129+
.cause()
130130
.isInstanceOf(ConflictException.class);
131131
}
132132

@@ -144,7 +144,7 @@ public void narrowcastWithRetry() throws Exception {
144144
assertThatThrownBy(
145145
() -> target.narrowcast(retryKey, request).get()
146146
).isInstanceOf(ExecutionException.class)
147-
.getCause()
147+
.cause()
148148
.isInstanceOf(ConflictException.class);
149149
}
150150
}

line-bot-api-client/src/main/java/com/linecorp/bot/client/exception/LineMessagingException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import lombok.Getter;
2222

2323
@Getter
24+
@SuppressWarnings("serial")
2425
public abstract class LineMessagingException extends Exception {
2526
static final long SERIAL_VERSION_UID = 0x001_003; // 1.3.x
2627
private static final long serialVersionUID = SERIAL_VERSION_UID;

line-bot-cli/src/main/resources/application.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ logging:
2121
%m%n%wEx
2222
2323
---
24-
spring.profiles: debug
24+
spring:
25+
config:
26+
activate:
27+
on-profile: "debug"
2528
logging:
2629
level:
2730
root: DEBUG

line-bot-model/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies {
2020
implementation(libs.jackson.datatype.jsr310)
2121
implementation(libs.jackson.module.parameter.names)
2222
implementation(libs.findbugs.jsr305)
23+
compileOnly(libs.jakarta.annotation.api)
2324

2425
testImplementation(libs.guava)
2526
testImplementation(libs.reflections)

0 commit comments

Comments
 (0)