GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Provide the matched PathPattern as a request attribute in MVC · Issue #37270 · spring-projects/spring-framework

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

New issue
Copy link
New issue
Copy link
Closed as not planned
#37272
Closed as not planned
Provide the matched PathPattern as a request attribute in MVC#37270
#37272
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

Description

@wilkinsona
wilkinsona
opened on Sep 11, 2026
Issue body actions

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

spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.java

Line 174 in c1d4a76

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

On the WebFlux side, the PathPattern itself is available:

spring-framework/spring-webflux/src/main/java/org/springframework/web/reactive/handler/AbstractUrlHandlerMapping.java

Line 167 in c1d4a76

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. spring-projects-issues
    added
    status: waiting-for-triageAn issue we've not yet triaged or decided on
    on Sep 11, 2026
  2. rstoyanchev
    added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    type: enhancementA general enhancement
    and removed
    status: waiting-for-triageAn issue we've not yet triaged or decided on
    on Sep 11, 2026
  3. rstoyanchev
    added this to the 7.1.x milestone on Sep 11, 2026
  4. Eymenonar commented on Sep 11, 2026

    @Eymenonar
    Eymenonar
    on Sep 11, 2026
    More actions

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

  5. wilkinsona
    marked this as blocking on Sep 16, 2026
    • Use cached PathPattern in AbstractWebMvcEndpointHandlerMapping spring-boot#51781
  6. bclozel commented on Sep 18, 2026

    @bclozel
    bclozel
    on Sep 18, 2026
    Member
    More actions

    Superseded by #37272

  7. bclozel
    closed this as not plannedon Sep 18, 2026
  8. bclozel
    removed this from the 7.1.x milestone on Sep 18, 2026
  9. bclozel
    added
    status: supersededAn issue that has been superseded by another
    on Sep 18, 2026
  10. wilkinsona
    unmarked this as blocking on Sep 21, 2026
    • Use cached PathPattern in AbstractWebMvcEndpointHandlerMapping spring-boot#51781
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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.