Skip to content

fix: select Spring 6 REST adapter for samples#1297

Draft
SavitarC wants to merge 1 commit into
apache:masterfrom
SavitarC:agent/select-dubbo-rest-spring6
Draft

fix: select Spring 6 REST adapter for samples#1297
SavitarC wants to merge 1 commit into
apache:masterfrom
SavitarC:agent/select-dubbo-rest-spring6

Conversation

@SavitarC

Copy link
Copy Markdown
Contributor

What changed

  • add an opt-in dubbo-rest-spring6 Maven profile to the Spring MVC Triple REST sample
  • add the same profile to the Spring Security resource-server sample
  • when enabled with -Ddubbo.rest.spring6=true, explicitly select:
    • dubbo-spring-boot-3-autoconfigure
    • dubbo-rest-spring6

Why

apache/dubbo#16394 separates the Spring 5 and Spring 6 REST adapters and removes the legacy dubbo-rest-spring implementation from the aggregate dubbo JAR.

These Spring Boot 3 samples currently depend only on dubbo-spring-boot-starter. With the candidate build from apache/dubbo#16394, no REST Spring adapter is present, Spring MVC request mappings are not registered, and the sample tests receive 404 Invoker not found responses.

The profile makes the adapter selection explicit while allowing the Dubbo pull request CI to test its locally built 3.3.7-SNAPSHOT artifacts.

Compatibility

The profile is disabled by default. Normal sample builds therefore remain compatible with the currently released Dubbo 3.3.1, which does not provide dubbo-rest-spring6.

After a Dubbo release containing dubbo-rest-spring6 becomes the samples baseline, these dependencies can become unconditional and the temporary activation property can be removed.

Validation

  • default 3.3.1 four-module reactor package passed with the profile disabled
  • effective POMs for both samples contain the two expected 3.3.7-SNAPSHOT dependencies when -Ddubbo.rest.spring6=true is set
  • git diff --check passed

Related

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.

1 participant