Skip to content

Map version from @HttpExchange to RequestMappingInfo - #36602

Merged
bclozel merged 1 commit into
spring-projects:7.0.xfrom
renatomameli:fix/httpexchange-version-mapping
Oct 13, 2026
Merged

bclozel merged 1 commit into
spring-projects:7.0.xfrom
renatomameli:fix/httpexchange-version-mapping

Conversation

@renatomameli

Copy link
Copy Markdown
Contributor

The version attribute from @HttpExchange and its shortcut annotations such as @GetExchange was not passed to the RequestMappingInfo builder, which caused version-based routing to be silently ignored for controllers annotated with @HttpExchange.

This commit adds .version(httpExchange.version()) to the createRequestMappingInfo(HttpExchange, ...) method in both WebMvc and WebFlux RequestMappingHandlerMapping, and adds corresponding tests.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 5, 2026
@renatomameli
renatomameli force-pushed the fix/httpexchange-version-mapping branch from e3d3272 to 9d7601b Compare April 5, 2026 19:53
@renatomameli

Copy link
Copy Markdown
Contributor Author

Hi team. Just a friendly ping on this PR. All checks are passing and there are no conflicts with main. I'd appreciate any feedback on the approach — happy to adjust if needed. Thanks! @sbrannen @jhoeller

@bclozel bclozel added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Sep 4, 2026
@bclozel
bclozel changed the base branch from main to 7.0.x October 13, 2026 14:54
The version attribute from @HttpExchange and its shortcut
annotations such as @GetExchange was not passed to the
RequestMappingInfo builder, which caused version-based
routing to be silently ignored for controllers annotated
with @HttpExchange.

This commit adds .version(httpExchange.version()) to the
createRequestMappingInfo(HttpExchange, ...) method in both
WebMvc and WebFlux RequestMappingHandlerMapping, and adds
corresponding tests.

Signed-off-by: Renato Mameli <renatomamel410@gmail.com>
@bclozel bclozel self-assigned this Oct 13, 2026
@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 13, 2026
@bclozel bclozel added this to the 7.0.10 milestone Oct 13, 2026
@bclozel
bclozel force-pushed the fix/httpexchange-version-mapping branch from 9d7601b to 091097d Compare October 13, 2026 15:08
@bclozel
bclozel merged commit 091097d into spring-projects:7.0.x Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants