Skip to content

Provide the matched PathPattern as a request attribute in MVC #37270

Description

@wilkinsona

On the WebMvc side, the PathPattern's pattern string is made available as a request attribute:

request.setAttribute(BEST_MATCHING_PATTERN_ATTRIBUTE, bestPattern.getPatternString());

On the WebFlux side, the PathPattern itself is available:

exchange.getAttributes().put(BEST_MATCHING_PATTERN_ATTRIBUTE, pattern);

Could a new attribute be introduced on the MVC side that exposes the PathPattern?

If we had the PathPattern on the MVC side, I think we could rework this WebMvc-based code in Boot to match more closely to its WebFlux-based equivalent.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions