Package org.springframework.web.filter
@NullMarked
package org.springframework.web.filter
Provides generic filter base classes allowing for bean-style configuration.
-
ClassDescriptionBase class for
Filters that perform logging operations before and after a request is processed.servlet Filter that allows one to specify a character encoding for requests.simple request logging filter that writes the request URI (and optionally the query string) to the Commons Log.A generic composite servletFilterthat just delegates its behavior to a chain (list) of user-supplied filters, achieving the functionality of aFilterChain, but conveniently using onlyFilterinstances.Filterto handle CORs pre-flight requests and intercept CORs simple and actual requests with aCorsProcessor, and to update the response, for example, with CORs response headers, based on the policy matched through the providedCorsConfigurationsource.Proxy for a standard servlet Filter, delegating to a spring-managed bean that implements the Filter interface.Filterthat parses form data for HTTP PUT, PATCH, and DELETE requests and exposes it as servlet request parameters.Extract values from "Forwarded" and "X-Forwarded-*" headers, wrap the request and response, and make they reflect the client-originated protocol and address in the following methods:getserverName()getserverPort()getscheme()issecure()sendRedirect(string).simple base implementation ofFilterwhich treats its config parameters (init-paramentries within thefiltertag inweb.xml) as bean properties.Filterthat converts posted method parameters into HTTP methods, retrievable viaHttpservletRequest.getMethod().Filter base class that aims to guarantee a single execution per request dispatch, on any servlet container.OverridesHttpservletResponse.sendRedirect(string)and handles it by setting the HTTP status and "Location" headers, which keeps the servlet container from re-writing relative redirect URLs into absolute ones.servlet Filter that exposes the request to the current thread, through bothLocaleContextHolderandRequestContextHolder.Filterthat createsobservationsfor HTTP exchanges.simple request logging filter that writes the request URI (and optionally the query string) to the servletContext log.Filterthatparses and cachesaRequestPaththat can then be accessed viaservletRequestPathUtils.getParsedRequestPath(servletRequest).Filterthat generates anETagvalue based on the content on the response.Filterthat modifies the URL, and then either redirects or wraps the request to effect the change.Builder forUrlHandlerFilter.A spec to configure a trailing slash handler.