Skip to content

Support Spring Boot 4 auto configuration#16360

Open
typefield wants to merge 3 commits into
apache:3.3from
typefield:issue-16214-spring-boot-4-support
Open

Support Spring Boot 4 auto configuration#16360
typefield wants to merge 3 commits into
apache:3.3from
typefield:issue-16214-spring-boot-4-support

Conversation

@typefield

Copy link
Copy Markdown

What is the purpose of the change

Support Spring Boot 4 for Dubbo Spring Boot integration.

Fixes #16214.

Brief changelog

  • Add dubbo-spring-boot-4-autoconfigure and dubbo-spring-boot-starter4 modules.
  • Add Spring Boot 4 Triple servlet/websocket auto-configuration using the Spring Boot 4 Tomcat factory API.
  • Keep Spring Boot 3 auto-configuration scoped to Boot 3 and add a dedicated Boot 4 dependency check auto-configuration.
  • Add Boot 4 auto-configuration smoke tests for Triple servlet, websocket, defaults, and Tomcat HTTP/2 customization.

Verifying this change

  • ./mvnw -pl dubbo-spring-boot-project/dubbo-spring-boot-4-autoconfigure -am -P spring-boot-4 -Dtest=DubboTriple4AutoConfigurationTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dspotless.check.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true test
  • ./mvnw -pl dubbo-spring-boot-project/dubbo-spring-boot-autoconfigure,dubbo-spring-boot-project/dubbo-spring-boot-4-autoconfigure,dubbo-spring-boot-project/dubbo-spring-boot-starters/dubbo-spring-boot-starter4 -am -P spring-boot-4 -DskipTests -Dspotless.check.skip=true -Dlicense.skip=true compile
  • ./mvnw -pl dubbo-spring-boot-project/dubbo-spring-boot-autoconfigure,dubbo-spring-boot-project/dubbo-spring-boot-3-autoconfigure,dubbo-spring-boot-project/dubbo-spring-boot-4-autoconfigure -P spring-boot-4 -DskipTests spotless:check

Note: a broader -am test run was stopped by pre-existing or environment-sensitive failures in dubbo-common before reaching this module, so the verification above narrows the test run to the new Boot 4 test while compiling the required reactor.

@codecov-commenter

codecov-commenter commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.33333% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.83%. Comparing base (2626e28) to head (61235c2).
⚠️ Report is 1 commits behind head on 3.3.

Files with missing lines Patch % Lines
...t/autoconfigure/DubboTriple4AutoConfiguration.java 66.66% 8 Missing ⚠️
...pring/boot/autoconfigure/SpringBoot4Condition.java 45.45% 3 Missing and 3 partials ⚠️
...pring/boot/autoconfigure/SpringBoot3Condition.java 33.33% 3 Missing and 3 partials ⚠️
...oot/autoconfigure/SpringBoot4OrLaterCondition.java 45.45% 3 Missing and 3 partials ⚠️
...boSpringBoot4DependencyCheckAutoConfiguration.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16360      +/-   ##
============================================
+ Coverage     60.81%   60.83%   +0.02%     
- Complexity       30    11763   +11733     
============================================
  Files          1953     1957       +4     
  Lines         89213    89272      +59     
  Branches      13460    13468       +8     
============================================
+ Hits          54254    54309      +55     
- Misses        29374    29378       +4     
  Partials       5585     5585              
Flag Coverage Δ
integration-tests-java21 32.08% <0.00%> (-0.08%) ⬇️
integration-tests-java8 32.21% <0.00%> (+0.02%) ⬆️
samples-tests-java21 32.20% <9.80%> (+0.04%) ⬆️
samples-tests-java8 29.82% <9.80%> (+<0.01%) ⬆️
unit-tests-java11 59.07% <32.00%> (+0.01%) ⬆️
unit-tests-java17 58.57% <48.33%> (+0.01%) ⬆️
unit-tests-java21 58.57% <48.33%> (+0.02%) ⬆️
unit-tests-java25 58.50% <48.33%> (+<0.01%) ⬆️
unit-tests-java8 59.08% <32.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] When will Dubbo be compatible with Spring Boot 4?

2 participants