Skip to content

Document Custom Servlet Filters in Web MVC #35217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

99hyeon
Copy link

@99hyeon 99hyeon commented Jul 18, 2025

This PR improves the Spring Web MVC documentation by adding a short section on creating custom servlet filters using GenericFilterBean and OncePerRequestFilter. This brings it in line with the WebFlux docs, which already explain WebFilter.

Includes:

  • Brief explanation of how to implement custom filters
  • Example using OncePerRequestFilter

Closes gh-30454

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 18, 2025
Add information to the Filters section about creating custom
filters by implementing `javax.servlet.Filter` or extending
Spring's `GenericFilterBean` and `OncePerRequestFilter`.

This brings consistency with the WebFlux documentation, which
already explains custom filters via `WebFilter`.

Signed-off-by: 99hyeon <[email protected]>
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 or decided on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve spring-web filter documentation
2 participants