Allow WebFlux ApiVersionResolver to return a Mono by JKaplanEmpty-Nes · Pull Request #36084 · spring-projects/spring-framework

@JKaplanEmpty-Nes JKaplanEmpty-Nes changed the title Change the API version resolution from being a nullable String to a Mono String Change the WebFlux API version resolution from being a nullable String to a Mono String

Dec 30, 2025

@bclozel bclozel added the in: web

Issues in web modules (web, webmvc, webflux, websocket)

label

Dec 30, 2025

rstoyanchev

@rstoyanchev rstoyanchev changed the title Change the WebFlux API version resolution from being a nullable String to a Mono String Allow WebFlux ApiVersionResolver to return a Mono

Jan 5, 2026

rstoyanchev

rstoyanchev

@JKaplanEmpty-Nes

Signed-off-by: Jonathan Kaplan <jkaplan@empty-nes.com>

rstoyanchev pushed a commit that referenced this pull request

Jan 8, 2026
See gh-36084

Signed-off-by: Jonathan Kaplan <jkaplan@empty-nes.com>

rstoyanchev added a commit that referenced this pull request

Jan 8, 2026

rstoyanchev added a commit that referenced this pull request

Jan 8, 2026

rstoyanchev added a commit that referenced this pull request

Jan 8, 2026
- deprecate sync method on ApiVersionResolver
- add SyncApiVersionResolver
- refactor resolverParseAndValidateApiVersion method

See gh-36084

rstoyanchev added a commit that referenced this pull request

Jan 8, 2026
Resolve conflicts and refactor merged code in AbstractHandlerMapping

See gh-36084

rstoyanchev added a commit that referenced this pull request

Jan 9, 2026
Instead of making it async and having a sync subinterface variant,
this restores ApiVersionResolver to be as it was with an async
subinterface variant.

ApiVersionStrategy, and the infrastructure invoking it, remains
async first, but also accommodates sync resolvers.

This should provide a better balance with backwards compatibility
while also accommodating async version resolution as the less
common scenario.

See gh-36084