Package | Description |
---|---|
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.setup |
Contains built-in
MockMvcBuilder implementations. |
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.mvc.annotation |
Support package for annotation-based Servlet MVC controllers.
|
org.springframework.web.servlet.mvc.method.annotation |
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation package. |
org.springframework.web.servlet.mvc.support |
Support package for MVC controllers.
|
Modifier and Type | Method and Description |
---|---|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.handlerExceptionResolvers(HandlerExceptionResolver... exceptionResolvers)
Set the HandlerExceptionResolver types to use.
|
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.setHandlerExceptionResolvers(HandlerExceptionResolver... exceptionResolvers)
Set the HandlerExceptionResolver types to use as an array.
|
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.setHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Set the HandlerExceptionResolver types to use as a list.
|
Modifier and Type | Method and Description |
---|---|
HandlerExceptionResolver |
WebMvcConfigurationSupport.handlerExceptionResolver(ContentNegotiationManager contentNegotiationManager)
Returns a
HandlerExceptionResolverComposite containing a list of exception
resolvers obtained either through WebMvcConfigurationSupport.configureHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>) or
through WebMvcConfigurationSupport.addDefaultHandlerExceptionResolvers(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver>, org.springframework.web.accept.ContentNegotiationManager) . |
Modifier and Type | Method and Description |
---|---|
protected void |
WebMvcConfigurationSupport.addDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers,
ContentNegotiationManager mvcContentNegotiationManager)
A method available to subclasses for adding default
HandlerExceptionResolvers . |
void |
WebMvcConfigurerAdapter.configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Deprecated.
Configure exception resolvers.
|
protected void |
DelegatingWebMvcConfiguration.configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) |
protected void |
WebMvcConfigurationSupport.configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Override this method to configure the list of
HandlerExceptionResolvers to use. |
default void |
WebMvcConfigurer.configureHandlerExceptionResolvers(List<HandlerExceptionResolver> resolvers)
Configure exception resolvers.
|
void |
WebMvcConfigurerAdapter.extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Deprecated.
Extending or modify the list of exception resolvers configured by default.
|
protected void |
DelegatingWebMvcConfiguration.extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) |
protected void |
WebMvcConfigurationSupport.extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Override this method to extend or modify the list of
HandlerExceptionResolvers after it has been configured. |
default void |
WebMvcConfigurer.extendHandlerExceptionResolvers(List<HandlerExceptionResolver> resolvers)
Extending or modify the list of exception resolvers configured by default.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractHandlerExceptionResolver
Abstract base class for
HandlerExceptionResolver implementations. |
class |
AbstractHandlerMethodExceptionResolver
Abstract base class for
HandlerExceptionResolver
implementations that support handling exceptions from handlers of type HandlerMethod . |
class |
HandlerExceptionResolverComposite
A
HandlerExceptionResolver that delegates to a list of other
HandlerExceptionResolvers . |
class |
SimpleMappingExceptionResolver
HandlerExceptionResolver implementation
that allows for mapping exception class names to view names, either for a set of
given handlers or for all handlers in the DispatcherServlet. |
Modifier and Type | Method and Description |
---|---|
List<HandlerExceptionResolver> |
HandlerExceptionResolverComposite.getExceptionResolvers()
Return the list of exception resolvers to delegate to.
|
Modifier and Type | Method and Description |
---|---|
void |
HandlerExceptionResolverComposite.setExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers)
Set the list of exception resolvers to delegate to.
|
Modifier and Type | Class and Description |
---|---|
class |
ResponseStatusExceptionResolver
A
HandlerExceptionResolver that uses the @ResponseStatus
annotation to map exceptions to HTTP status codes. |
Modifier and Type | Class and Description |
---|---|
class |
ExceptionHandlerExceptionResolver
An
AbstractHandlerMethodExceptionResolver that resolves exceptions
through @ExceptionHandler methods. |
Modifier and Type | Class and Description |
---|---|
class |
DefaultHandlerExceptionResolver
The default implementation of the
HandlerExceptionResolver
interface, resolving standard Spring MVC exceptions and translating them to corresponding
HTTP status codes. |