Package | Description |
---|---|
org.springframework.test.web.servlet |
Contains server-side support for testing Spring MVC applications.
|
org.springframework.test.web.servlet.client |
Support for testing Spring MVC applications via
WebTestClient
with MockMvc for server request
handling. |
org.springframework.test.web.servlet.result |
Contains built-in
ResultMatcher and ResultHandler implementations. |
org.springframework.test.web.servlet.setup |
Contains built-in
MockMvcBuilder implementations. |
org.springframework.web.servlet |
Provides servlets that integrate with the application context
infrastructure, and the core interfaces and classes for the
Spring web MVC framework.
|
org.springframework.web.servlet.config.annotation |
Annotation-based setup for Spring MVC.
|
org.springframework.web.servlet.handler |
Provides standard HandlerMapping implementations,
including abstract base classes for custom implementations.
|
org.springframework.web.servlet.i18n |
Locale support classes for Spring's web MVC framework.
|
org.springframework.web.servlet.mvc |
Standard controller implementations for the Servlet MVC framework that comes with
Spring.
|
org.springframework.web.servlet.resource |
Support classes for serving static resources.
|
org.springframework.web.servlet.theme |
Theme support classes for Spring's web MVC framework.
|
Modifier and Type | Method and Description |
---|---|
HandlerInterceptor[] |
MvcResult.getInterceptors()
Return interceptors around the handler.
|
Modifier and Type | Method and Description |
---|---|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.interceptors(HandlerInterceptor... interceptors)
Add global interceptors.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.mappedInterceptors(String[] pathPatterns,
HandlerInterceptor... interceptors)
Add interceptors for specific patterns.
|
Modifier and Type | Method and Description |
---|---|
protected void |
PrintingResultHandler.printHandler(Object handler,
HandlerInterceptor[] interceptors)
Print the handler.
|
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.addInterceptors(HandlerInterceptor... interceptors)
Add interceptors mapped to all incoming requests.
|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.addMappedInterceptors(String[] pathPatterns,
HandlerInterceptor... interceptors)
Add interceptors mapped to a set of path patterns.
|
Modifier and Type | Interface and Description |
---|---|
interface |
AsyncHandlerInterceptor
Extends
HandlerInterceptor with a callback method invoked after the
start of asynchronous request handling. |
Modifier and Type | Method and Description |
---|---|
HandlerInterceptor[] |
HandlerExecutionChain.getInterceptors()
Return the array of interceptors to apply (in the given order).
|
Modifier and Type | Method and Description |
---|---|
List<HandlerInterceptor> |
HandlerExecutionChain.getInterceptorList()
Return the list of interceptors to apply (in the given order).
|
Modifier and Type | Method and Description |
---|---|
void |
HandlerExecutionChain.addInterceptor(HandlerInterceptor interceptor)
Add the given interceptor to the end of this chain.
|
void |
HandlerExecutionChain.addInterceptor(int index,
HandlerInterceptor interceptor)
Add the given interceptor at the specified index of this chain.
|
void |
HandlerExecutionChain.addInterceptors(HandlerInterceptor... interceptors)
Add the given interceptors to the end of this chain.
|
Constructor and Description |
---|
HandlerExecutionChain(Object handler,
HandlerInterceptor... interceptors)
Create a new HandlerExecutionChain.
|
Constructor and Description |
---|
HandlerExecutionChain(Object handler,
List<HandlerInterceptor> interceptorList)
Create a new HandlerExecutionChain.
|
Modifier and Type | Method and Description |
---|---|
InterceptorRegistration |
InterceptorRegistry.addInterceptor(HandlerInterceptor interceptor)
Adds the provided
HandlerInterceptor . |
Constructor and Description |
---|
InterceptorRegistration(HandlerInterceptor interceptor)
Create an
InterceptorRegistration instance. |
Modifier and Type | Class and Description |
---|---|
class |
ConversionServiceExposingInterceptor
Interceptor that places the configured
ConversionService in request scope
so it's available during request processing. |
class |
HandlerInterceptorAdapter
Deprecated.
as of 5.3 in favor of implementing
HandlerInterceptor
and/or AsyncHandlerInterceptor directly. |
class |
MappedInterceptor
Wraps a
HandlerInterceptor and uses URL patterns to determine whether
it applies to a given request. |
class |
UserRoleAuthorizationInterceptor
Interceptor that checks the authorization of the current user via the
user's roles, as evaluated by HttpServletRequest's isUserInRole method.
|
class |
WebRequestHandlerInterceptorAdapter
Adapter that implements the Servlet HandlerInterceptor interface
and wraps an underlying WebRequestInterceptor.
|
Modifier and Type | Method and Description |
---|---|
protected HandlerInterceptor |
AbstractHandlerMapping.adaptInterceptor(Object interceptor)
Adapt the given interceptor object to
HandlerInterceptor . |
protected HandlerInterceptor[] |
AbstractHandlerMapping.getAdaptedInterceptors()
Return the adapted interceptors as
HandlerInterceptor array. |
HandlerInterceptor |
MappedInterceptor.getInterceptor()
The target
HandlerInterceptor to invoke in case of a match. |
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractHandlerMapping.detectMappedInterceptors(List<HandlerInterceptor> mappedInterceptors)
Detect beans of type
MappedInterceptor and add them to the list
of mapped interceptors. |
Constructor and Description |
---|
MappedInterceptor(String[] includePatterns,
HandlerInterceptor interceptor)
Variant of
MappedInterceptor(String[], String[], HandlerInterceptor, PathPatternParser)
with include patterns only. |
MappedInterceptor(String[] includePatterns,
String[] excludePatterns,
HandlerInterceptor interceptor)
Variant of
MappedInterceptor(String[], String[], HandlerInterceptor, PathPatternParser)
without a provided parser. |
MappedInterceptor(String[] includePatterns,
String[] excludePatterns,
HandlerInterceptor interceptor,
PathPatternParser parser)
Create an instance with the given include and exclude patterns along with
the target interceptor for the mappings.
|
Modifier and Type | Class and Description |
---|---|
class |
LocaleChangeInterceptor
Interceptor that allows for changing the current locale on every request,
via a configurable request parameter (default parameter name: "locale").
|
Modifier and Type | Class and Description |
---|---|
class |
WebContentInterceptor
Handler interceptor that checks the request for supported methods and a
required session and prepares the response by applying the configured
cache settings.
|
Modifier and Type | Class and Description |
---|---|
class |
ResourceUrlProviderExposingInterceptor
An interceptor that exposes the
ResourceUrlProvider instance it
is configured with as a request attribute. |
Modifier and Type | Class and Description |
---|---|
class |
ThemeChangeInterceptor
Interceptor that allows for changing the current theme on every request,
via a configurable request parameter (default parameter name: "theme").
|