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 — Expose matched PathPattern as MVC request attribute by Eymenonar · Pull Request #37272 · spring-projects/spring-framework

Conversation

@Eymenonar

@Eymenonar Eymenonar commented Sep 11, 2026

Copy link
Copy Markdown

Provide BEST_MATCHING_PATH_PATTERN_ATTRIBUTE for MVC requests handled with parsed patterns while keeping the existing String attribute unchanged.

Closes gh-37270

Tests: ./gradlew :spring-webmvc:check

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 11, 2026
@sbrannen

sbrannen commented Sep 14, 2026

Copy link
Copy Markdown
Member

I have not fully reviewed of the proposal, but at a glance it looks like we'd want to set the new BEST_MATCHING_PATH_PATTERN_ATTRIBUTE twice in RequestMappingInfoHandlerMapping (instead of just once) as well as in AbstractUrlHandlerMapping and RouterFunctionMapping.

Also, we'll likely want to add more thorough test coverage for the various use cases: path pattern in use, path pattern not in use, path pattern not set, etc.

In any case, we'll discuss your general proposal within the team.

Eymenonar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sbrannen sbrannen added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Sep 14, 2026
@bclozel
bclozel force-pushed the gh-37270-mvc-path-pattern-attribute branch from 190fd8d to b541a62 Compare September 18, 2026 15:15
@bclozel bclozel self-assigned this Sep 18, 2026
@bclozel bclozel added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 18, 2026
@bclozel bclozel added this to the 7.1.0-M2 milestone Sep 18, 2026
@bclozel bclozel mentioned this pull request Sep 18, 2026
Provide the matched PathPattern as a request attribute in MVC #37270
Closed
Eymen and others added 2 commits September 18, 2026 17:21
Eymen @bclozel
Expose matched PathPattern as MVC request attribute
f9f9186
Signed-off-by: Eymen <[email protected]>
@bclozel
Polishing contribution
f6e53b7
See spring-projectsgh-37272
@bclozel
bclozel force-pushed the gh-37270-mvc-path-pattern-attribute branch from b541a62 to f6e53b7 Compare September 18, 2026 15:21
@bclozel
bclozel merged commit f6e53b7 into spring-projects:main Sep 18, 2026
1 check failed

Uh oh!

There was an error while loading. Please reload this page.

@bclozel

bclozel commented Sep 18, 2026

Copy link
Copy Markdown
Member

Thanks for your contribution @Eymenonar !

Eymenonar reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@bclozel bclozel

Labels

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

Projects

None yet

Milestone

7.1.0-M2

Development

Successfully merging this pull request may close these issues.

Provide the matched PathPattern as a request attribute in MVC

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@Eymenonar @sbrannen @bclozel @spring-projects-issues
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.