open class CorsRegistration
Assists with the creation of a CorsConfiguration instance mapped to a path pattern. By default all origins, headers, and credentials for |
|
open class InterceptorRegistration
Assists with the creation of a MappedInterceptor. |
|
open class RedirectViewControllerRegistration
Assist with the registration of a single redirect view controller. |
|
open class ResourceHandlerRegistration
Encapsulates information required to create a resource handler. |
|
open class UrlBasedViewResolverRegistration
Assist with configuring a org.springframework.web.servlet.view.UrlBasedViewResolver. |
|
open class ViewControllerRegistration
Assist with the registration of a single view controller. |
|
open class WebMvcConfigurationSupport : ApplicationContextAware, ServletContextAware
This is the main class providing the configuration behind the MVC Java config. It is typically imported by adding EnableWebMvc to an application Configuration class. An alternative more advanced option is to extend directly from this class and override methods as necessary, remembering to add Configuration to the subclass and Bean to overridden Bean methods. For more details see the javadoc of EnableWebMvc. This class registers the following HandlerMappings:
Registers these HandlerAdapters:
Registers a HandlerExceptionResolverComposite with this chain of exception resolvers:
Registers an AntPathMatcher and a UrlPathHelper to be used by:
Both the RequestMappingHandlerAdapter and the ExceptionHandlerExceptionResolver are configured with default instances of the following by default:
|
|
abstract class WebMvcConfigurerAdapter : WebMvcConfigurer
An implementation of WebMvcConfigurer with empty methods allowing subclasses to override only the methods they're interested in. |
class EnableWebMvc
Adding this annotation to an
To customize the imported configuration, implement the interface WebMvcConfigurer and override individual methods, e.g.:
Note: only one If WebMvcConfigurer does not expose some more advanced setting that needs to be configured consider removing the
|