Skip to content

Commit c60f0df

Browse files
chore: migrate to Spring Boot 4.0 (#1772)
* chore: migrate to Spring Boot 4.0 Signed-off-by: Javier Aliaga <javier@diagrid.io> * fix: keep core modules on JUnit 5 Signed-off-by: Javier Aliaga <javier@diagrid.io> * fix: run sdk-tests integration tests on JUnit 6 Signed-off-by: Javier Aliaga <javier@diagrid.io> * test: re-enable orders endpoint integration test Signed-off-by: Javier Aliaga <javier@diagrid.io> * chore: fix example README links and remove redundant imports Signed-off-by: Javier Aliaga <javier@diagrid.io> * docs: add SUPPORT.md with Spring Boot compatibility matrix Signed-off-by: Javier Aliaga <javier@diagrid.io> --------- Signed-off-by: Javier Aliaga <javier@diagrid.io>
1 parent 2a036fe commit c60f0df

225 files changed

Lines changed: 790 additions & 9284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build.yml‎

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,9 @@ jobs:
104104
fail-fast: false
105105
matrix:
106106
java: [ 17 ]
107-
spring-boot-version: [ 3.5.4 ]
108-
spring-boot-display-version: [ 3.5.x ]
107+
spring-boot-version: [ 4.0.5 ]
108+
spring-boot-display-version: [ 4.0.x ]
109109
experimental: [ false ]
110-
include:
111-
- java: 17
112-
spring-boot-version: 4.0.2
113-
spring-boot-display-version: 4.0.x
114-
experimental: false
115110
env:
116111
JDK_VER: ${{ matrix.java }}
117112
steps:
@@ -125,48 +120,38 @@ jobs:
125120
java-version: ${{ env.JDK_VER }}
126121
- name: Clean up and install sdk
127122
run: ./mvnw clean install -B -q -DskipTests
128-
- name: Integration tests using spring boot 3.x version ${{ matrix.spring-boot-version }}
123+
- name: Integration tests using Spring Boot ${{ matrix.spring-boot-version }}
129124
id: integration_tests
130-
if: ${{ matrix.spring-boot-display-version == '3.5.x' }}
131125
uses: nick-fields/retry@v3
132126
with:
133127
max_attempts: 2
134128
timeout_minutes: 30
135129
retry_wait_seconds: 15
136130
command: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -pl !durabletask-client -Pintegration-tests dependency:copy-dependencies verify
137-
- name: Integration tests using spring boot 4.x version ${{ matrix.spring-boot-version }}
138-
id: integration_sb4_tests
139-
if: ${{ matrix.spring-boot-display-version == '4.0.x' }}
140-
uses: nick-fields/retry@v3
141-
with:
142-
max_attempts: 2
143-
timeout_minutes: 30
144-
retry_wait_seconds: 15
145-
command: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -pl !durabletask-client -Pintegration-sb4-tests dependency:copy-dependencies verify
146131
- name: Upload failsafe test report for sdk-tests on failure
147132
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
148133
uses: actions/upload-artifact@v7
149134
with:
150135
name: failsafe-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
151136
path: sdk-tests/target/failsafe-reports
152-
- name: Upload failsafe test report for sb4 sdk-tests on failure
153-
if: ${{ failure() && steps.integration_sb4_tests.conclusion == 'failure' }}
137+
- name: Upload failsafe test report for spring-boot-sdk-tests on failure
138+
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
154139
uses: actions/upload-artifact@v7
155140
with:
156-
name: failsafe-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
157-
path: spring-boot-4-sdk-tests/target/failsafe-reports
141+
name: failsafe-report-spring-boot-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
142+
path: spring-boot-sdk-tests/target/failsafe-reports
158143
- name: Upload surefire test report for sdk-tests on failure
159144
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
160145
uses: actions/upload-artifact@v7
161146
with:
162147
name: surefire-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
163148
path: sdk-tests/target/surefire-reports
164-
- name: Upload surefire test report for sdk-tests on failure
165-
if: ${{ failure() && steps.integration_sb4_tests.conclusion == 'failure' }}
149+
- name: Upload surefire test report for spring-boot-sdk-tests on failure
150+
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
166151
uses: actions/upload-artifact@v7
167152
with:
168-
name: surefire-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
169-
path: spring-boot-4-sdk-tests/target/surefire-reports
153+
name: surefire-report-spring-boot-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
154+
path: spring-boot-sdk-tests/target/surefire-reports
170155

171156

172157
publish:

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ If using [SDKMAN!](https://sdkman.io), execute `sdk env install` to install the
6060

6161
### Importing Dapr's Java SDK
6262

63+
> **Spring Boot compatibility:** from **1.19.0** onward, the SDK's Spring integration targets **Spring Boot 4.0**. If you are on **Spring Boot 3.5**, use the **1.18.x** line instead. See **[SUPPORT.md](SUPPORT.md)** for the full compatibility matrix and version-support policy.
64+
6365
#### Using a BOM (recommended)
6466

6567
Two BOMs are published:

‎SUPPORT.md‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Support and Version Compatibility
2+
3+
The Dapr Java SDK is released in version lines, and **the SDK version is the primary axis**: each
4+
line is built against a specific Dapr runtime API and — for the Spring integration modules — a
5+
specific Spring Boot generation. Importing `io.dapr.spring:dapr-spring-bom` (or `io.dapr:dapr-sdk-bom`)
6+
at a given version pins the whole stack, core and Spring, to that single version.
7+
8+
## Supported versions
9+
10+
| SDK line | Dapr runtime API | Spring Boot (Spring modules only) | JDK | Status |
11+
|-------------|------------------|-----------------------------------|-----|---------------------------------------------------|
12+
| **1.19.x+** | v1.18 | 4.0.x | 17+ | Active — new features and fixes |
13+
| **1.18.x** | v1.18 | 3.5.x | 17+ | Maintenance — best-effort security/critical fixes |
14+
15+
The **core** SDK modules (`dapr-sdk`, `dapr-sdk-actors`, `dapr-sdk-workflows`, `durabletask-client`)
16+
are framework-agnostic and do not depend on Spring Boot — the Spring Boot column applies only to the
17+
Spring integration modules (`dapr-sdk-springboot`, `dapr-spring-*`). Core and Spring modules always
18+
share the same SDK version (the Spring BOM imports `dapr-sdk-bom` at its own version), so they never
19+
diverge.
20+
21+
### Spring Boot stack detail
22+
23+
For the Spring integration modules, each Spring Boot generation implies the following stack:
24+
25+
| Spring Boot | Spring Framework | Jakarta EE | Jackson | JUnit |
26+
|-------------|------------------|------------|---------------------|-------|
27+
| 4.0.x | 7.x | 11 | 3 (`tools.jackson`) | 6 |
28+
| 3.5.x | 6.x | 10 | 2 (`com.fasterxml`) | 5 |
29+
30+
Spring Boot 4 is **not** binary-compatible with Spring Boot 3 (Spring Framework 6→7, Jakarta EE
31+
10→11, Jackson 2→3), so a single build cannot serve both — which is why Spring Boot support is split
32+
across SDK lines.
33+
34+
## Choosing a version
35+
36+
- **Spring integration on Spring Boot 4.0.x** → **1.19.x+**
37+
- **Spring integration on Spring Boot 3.5.x** → **1.18.x**
38+
- **Core SDK only (no Spring)** → any supported line; choose by the Dapr runtime you target.
39+
40+
Mixing a 1.19.x Spring starter into a Spring Boot 3 application (or a 1.18.x starter into Spring
41+
Boot 4) results in runtime failures such as `NoClassDefFoundError` / `NoSuchMethodError`, caused by
42+
the incompatible Spring Framework, Jakarta namespace, and Jackson versions.
43+
44+
## Dapr runtime compatibility
45+
46+
Dapr runtime compatibility applies to **all** SDK modules (core and Spring alike) and does not change
47+
with your Spring Boot version — the SDK talks to the Dapr sidecar over a versioned gRPC/HTTP API,
48+
pinned per SDK line (see the table above). Because the Dapr runtime maintains API backward
49+
compatibility within a major version, an SDK line also works against later runtime releases. See the
50+
[Dapr version support policy](https://docs.dapr.io/operations/support/support-release-policy/) for the
51+
runtime's own supported-version window.
52+
53+
## Support policy
54+
55+
- **1.19.x (Spring Boot 4.0)** is the actively developed line.
56+
- **1.18.x (Spring Boot 3.5)** is maintained on a best-effort basis for security and critical fixes,
57+
as a bridge for users still on Spring Boot 3.5 while they move to Spring Boot 4. Spring Boot 3.5's
58+
own OSS support window has ended (see the
59+
[Spring Boot support page](https://spring.io/projects/spring-boot#support)), so users on Spring
60+
Boot 3.x are encouraged to upgrade.
61+
62+
## Migrating from Spring Boot 3.5 to 4.0
63+
64+
1. Upgrade your application to Spring Boot 4.0, following the official
65+
[Spring Boot 4.0 Migration Guide](https://github.com/spring-projects/spring-boot/wiki).
66+
2. Move the Dapr SDK dependency (or `dapr-spring-bom` import) to **1.19.x**. The artifact coordinates
67+
are unchanged; only the version differs.

‎dapr-spring/dapr-spring-6-data/pom.xml‎

Lines changed: 0 additions & 61 deletions
This file was deleted.

‎dapr-spring/dapr-spring-6-data/src/main/java/io/dapr/spring6/data/AbstractDaprKeyValueAdapter.java‎

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)