Skip to content

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

Closed as not planned

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

  1. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    and removed on Sep 11, 2026
  2. added this to the 7.1.x milestone on Sep 11, 2026
  3. Eymenonar commented on Sep 11, 2026

    @Eymenonar

    I'd like to work on this. I'll add focused MVC coverage for exposing the matched PathPattern as a request attribute.

  4. bclozel commented on Sep 18, 2026

    @bclozel
    Member

    Superseded by #37272

  5. removed this from the 7.1.x milestone on Sep 18, 2026
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)status: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions