Skip to content

Commit b4dae3a

Browse files
authored
Bump Java version to 21 to 25 (#287)
1 parent 0cd6f54 commit b4dae3a

File tree

39 files changed

+67
-44
lines changed

39 files changed

+67
-44
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,18 @@ jobs:
6363
steps:
6464
- name: Checkout repository
6565
uses: actions/checkout@v5
66-
66+
- name: Set up JDK
67+
uses: actions/setup-java@v5
68+
with:
69+
java-version: '25'
70+
distribution: 'temurin'
6771
# Initializes the CodeQL tools for scanning.
6872
- name: Initialize CodeQL
6973
uses: github/codeql-action/init@v3
7074
with:
7175
languages: ${{ matrix.language }}
7276
build-mode: ${{ matrix.build-mode }}
77+
7378
# If you wish to specify custom queries, you can do so here or in a config file.
7479
# By default, queries listed here will override any specified in a config file.
7580
# Prefix the list here with "+" to use these queries and those in the config file.

.github/workflows/gradle-build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Set up JDK
6161
uses: actions/setup-java@v5
6262
with:
63-
java-version: '21'
63+
java-version: '25'
6464
distribution: 'temurin'
6565
- name: Setup Gradle
6666
uses: gradle/actions/setup-gradle@v4
@@ -89,6 +89,24 @@ jobs:
8989
name: build-artifacts
9090
path: '**/build/'
9191

92+
dependecy-submission:
93+
name: Dependency Submission
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout sources
97+
uses: actions/checkout@v5
98+
- name: Setup Java
99+
uses: actions/setup-java@v5
100+
with:
101+
distribution: 'temurin'
102+
java-version: 25
103+
- name: Generate and submit dependency graph
104+
uses: gradle/actions/dependency-submission@v4
105+
with:
106+
build-scan-publish: true
107+
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
108+
build-scan-terms-of-use-agree: "yes"
109+
92110
code-quality:
93111
name: Code Quality with Sonar
94112
needs: [gradle-build, check-changes]
@@ -101,7 +119,7 @@ jobs:
101119
- name: Set up JDK
102120
uses: actions/setup-java@v5
103121
with:
104-
java-version: '21'
122+
java-version: '25'
105123
distribution: 'temurin'
106124
- name: Setup Gradle
107125
uses: gradle/actions/setup-gradle@v4

.github/workflows/gradle-wrapper-updater.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up JDK
1515
uses: actions/setup-java@v5
1616
with:
17-
java-version: '21'
17+
java-version: '25'
1818
distribution: 'temurin'
1919

2020
- name: Update Gradle Wrapper

README.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Samples and tutorials for https://spring.io/projects/spring-boot[Spring Boot] mo
88
Spring Data, Spring Batch, Spring Cloud, Spring Security, Spring GraphQL, and Spring Test. Each tutorial is equipped
99
with source code in individual submodules and can be found on {url-quickref}[GitHub].
1010

11-
image:https://img.shields.io/badge/Java_-21-blue?style=flat-square[Static Badge]
12-
image:https://img.shields.io/badge/Spring_Boot-3.5.5-blue?style=flat-square&logo=springboot[Spring Boot version]
11+
image:https://img.shields.io/badge/Java_-25-blue?style=flat-square[Static Badge]
12+
image:https://img.shields.io/badge/Spring_Boot-3.5.6-blue?style=flat-square&logo=springboot[Spring Boot version]
1313
image:https://img.shields.io/github/actions/workflow/status/rashidi/spring-boot-tutorials/gradle-build.yml?style=flat-square&logo=githubactions&color=blue[Gradle Build]
1414
image:https://img.shields.io/github/actions/workflow/status/rashidi/spring-boot-tutorials/build-and-publish-antora.yml?style=flat-square&logo=antora&label=Antora&color=blue[Antora Site Status, link={url-docs}]
1515
image:https://img.shields.io/sonar/coverage/rashidi_spring-boot-tutorials?server=https%3A%2F%2Fsonarcloud.io&style=flat-square&color=blue[Sonar Coverage]
@@ -27,8 +27,8 @@ best practices and keeping all dependencies up-to-date. The quality of these tut
2727
and always will be, my primary goal.
2828

2929
With the help of https://github.com/dependabot[Dependabot], each tutorial is also kept up-to-date with the latest
30-
dependencies. Currently, we are using Java https://adoptium.net/en-GB/temurin/releases/?version=21[Temurin 21]
31-
with https://plugins.gradle.org/plugin/org.springframework.boot/3.5.5[Spring Boot 3.5.5].
30+
dependencies. Currently, we are using Java https://adoptium.net/en-GB/temurin/releases?version=25[Temurin 25]
31+
with https://plugins.gradle.org/plugin/org.springframework.boot/3.5.6[Spring Boot 3.5.6].
3232

3333
== Documentation
3434

batch-rest-repository/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version = "0.0.1-SNAPSHOT"
99

1010
java {
1111
toolchain {
12-
languageVersion.set(JavaLanguageVersion.of(21))
12+
languageVersion.set(JavaLanguageVersion.of(25))
1313
}
1414
}
1515

batch-skip-step/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version = "0.0.1-SNAPSHOT"
99

1010
java {
1111
toolchain {
12-
languageVersion.set(JavaLanguageVersion.of(21))
12+
languageVersion.set(JavaLanguageVersion.of(25))
1313
}
1414
}
1515

batch-skip-step/src/test/java/zin/rashidi/boot/batch/user/UserBatchJobTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void findAll() {
6868
assertThat(execution.getExitStatus()).isEqualTo(COMPLETED);
6969
});
7070

71-
var users = jdbc.query("SELECT * FROM users", (rs, rowNum) ->
71+
var users = jdbc.query("SELECT * FROM users", (rs, _) ->
7272
new User(rs.getLong("id"), rs.getString("name"), rs.getString("username"))
7373
);
7474

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ version = "0.0.1-SNAPSHOT"
1313

1414
java {
1515
toolchain {
16-
languageVersion.set(JavaLanguageVersion.of(21))
16+
languageVersion.set(JavaLanguageVersion.of(25))
1717
}
1818
}
1919

cloud-jdbc-env-repo/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val springCloudVersion = "2025.0.0"
1111

1212
java {
1313
toolchain {
14-
languageVersion.set(JavaLanguageVersion.of(21))
14+
languageVersion.set(JavaLanguageVersion.of(25))
1515
}
1616
}
1717

cloud-jdbc-env-repo/src/main/java/zin/rashidi/boot/cloud/jdbcenvrepo/greet/GreetResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class GreetResource {
1818

1919
@GetMapping("/greet")
2020
public String greet(@RequestParam String greeting) {
21-
return String.format("%s, my name is %s", greeting, properties.name());
21+
return "%s, my name is %s".formatted(greeting, properties.name());
2222
}
2323

2424
}

0 commit comments

Comments
 (0)