Skip to content

Document global servlet path matcher configuration - #19517

Open
yashdotdev13 wants to merge 1 commit into
spring-projects:6.5.xfrom
yashdotdev13:docs/servlet-path-migration-guide
Open

Document global servlet path matcher configuration#19517
yashdotdev13 wants to merge 1 commit into
spring-projects:6.5.xfrom
yashdotdev13:docs/servlet-path-migration-guide

Conversation

@yashdotdev13

Copy link
Copy Markdown

Fixes #17811

This updates the Spring Security 7 migration guide to explain an alternative way to handle servlet path prefixes in authorization rules.

In addition to the existing explicit basePath("/mvc") example, the guide now shows how to configure a global PathPatternRequestMatcher.Builder bean for applications that use the same servlet path across most authorization rules.

The example uses PathPatternRequestMatcher.withPathPatternParser(...) together with DispatcherServletPath so the configured servlet path is applied consistently when Spring Security builds request matchers from string-based authorization methods.

Validation

  • git diff --check
  • Reviewed the generated patch locally

Note: the local :spring-security-docs:antora build was blocked by an unrelated Windows esbuild/Gradle environment issue in the JavaScript task, not by this documentation change.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 10, 2026
@yashdotdev13
yashdotdev13 changed the base branch from main to 6.5.x August 10, 2026 18:48
Signed-off-by: Yash Chauhan <yashchauhan.gaya@gmail.com>
@yashdotdev13
yashdotdev13 force-pushed the docs/servlet-path-migration-guide branch from 54f419a to 31a3f56 Compare August 10, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Instructions Detailing Servlet Path Declaration in Migration Guides

2 participants