Package org.springframework.web.filter
Interface UrlHandlerFilter.TrailingSlashHandlerSpec
- Enclosing class:
- UrlHandlerFilter
public static interface UrlHandlerFilter.TrailingSlashHandlerSpec
A spec to configure a trailing slash handler.
-
Method Summary
Modifier and TypeMethodDescriptionHandle by wrapping the request with the trimmed trailing slash and delegating to the rest of the filter chain.andRedirect
(HttpStatus status) Handle by sending a redirect with the given HTTP status and a location with the trailing slash trimmed.intercept
(Consumer<HttpServletRequest> consumer) A callback to intercept requests with a trailing slash.
-
Method Details
-
intercept
A callback to intercept requests with a trailing slash.- Parameters:
consumer
- callback to be invoked for requests with a trailing slash- Returns:
- the same spec instance
-
andRedirect
Handle by sending a redirect with the given HTTP status and a location with the trailing slash trimmed.- Parameters:
status
- the status to use- Returns:
- to go back to the main
UrlHandlerFilter.Builder
and either add more handlers or build theFilter
instance.
-
andHandleRequest
UrlHandlerFilter.Builder andHandleRequest()Handle by wrapping the request with the trimmed trailing slash and delegating to the rest of the filter chain.- Returns:
- to go back to the main
UrlHandlerFilter.Builder
and either add more handlers or build theFilter
instance.
-