feat: add Spring 6 REST adapter artifact#16394
Draft
SavitarC wants to merge 3 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 3.3 #16394 +/- ##
============================================
- Coverage 60.90% 58.78% -2.12%
+ Complexity 11763 167 -11596
============================================
Files 1953 1977 +24
Lines 89266 89818 +552
Branches 13471 13562 +91
============================================
- Hits 54367 52803 -1564
- Misses 29319 31277 +1958
- Partials 5580 5738 +158
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
dubbo-rest-spring6artifact backed by Spring 6 and the Jakarta Servlet APIdubbo-rest-springartifact for Spring 5 and the javax Servlet APIdubboanddubbo-all-shadedaggregate JARsWhy
dubbo-rest-springis compiled against Spring 5 andjavax.servlet. Spring Framework 6 changed the relevant MVC method descriptors tojakarta.servlet, so the legacy adapter cannot be used on that path without breaking Spring 5 compatibility.A separate artifact keeps the Spring 5 contract intact while providing a Jakarta-compatible integration for Spring Framework 6+. Because the two artifacts intentionally expose the same extension FQCNs, they must never be present on the same runtime classpath.
Fixes #16387.
Dependency changes
dubbo-spring-boot-starterremains unchanged and continues to provide the common Spring Boot autoconfiguration.dubboanddubbo-all-shadedaggregate JARs no longer bundledubbo-rest-spring.dubbo-spring-boot-autoconfigurenordubbo-spring-boot-3-autoconfigureselects a REST Spring adapter transitively.Migration
Applications that do not use the REST Spring integration do not need either adapter.
Spring Boot 2 / Spring Framework 5
Keep the shared starter and add
dubbo-rest-springexplicitly:Spring Boot 3 / Spring Framework 6
Keep the shared starter, add the Boot 3 autoconfiguration, and select
dubbo-rest-spring6:When the Dubbo BOM manages these artifacts, the individual
<version>elements may be omitted. Applications depending directly on thedubboaggregate artifact must follow the same explicit adapter selection rule. Remove the other adapter if it is already declared; startup now fails with the conflicting resource locations when both are present.Validation
RestSpringArtifactIsolationTest: 3/3 passed;FileTest: 8/8 passedgit diff --checkpassed