Generated by

org.springframework.web.servlet.config.annotation Documentation Differences

This file contains all the changes in documentation in the package org.springframework.web.servlet.config.annotation as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class DefaultServletHandlerConfigurer

Configures a request handler for serving static resources by forwarding the request to the Servlet container's "default" Servlet. This is indendedintended to be used when the Spring MVC DispatcherServlet is mapped to "/" thus overriding the Servlet container's default handling of static resources. Since this handler is configured at the lowest precedence, effectively it allows all other handler mappings to handle the request, and if none of them do, this handler can forward it to the "default" Servlet. @author Rossen Stoyanchev @since 3.1 @see DefaultServletHttpRequestHandler

Class DelegatingWebMvcConfiguration

ExtendsA sub-class of {@code WebMvcConfigurationSupport} withthat thedetects and abilitydelegates to detectall beans beans of type WebMvcConfigurer and giveallowing them a chance to customize the the configuration provided configuration by delegating{@code toWebMvcConfigurationSupport}. them at the appropriateThis is the class times. actually imported by @EnableWebMvc. @author Rossen Stoyanchev @since 3.1 @see EnableWebMvc1

Class InterceptorRegistration

EncapsulatesAssists a HandlerInterceptor and an optional list ofwith URL patterns. Results in the creation of a MappedInterceptor if URL patterns are provided. @author Rossen Stoyanchev @author Keith Donald @since 3.1
Class InterceptorRegistration, InterceptorRegistration addPathPatterns(String[])

AddsAdd one or more URL patterns to which the registered interceptor should apply to. If no URL patterns are provided, the interceptor applies to all paths.
Class InterceptorRegistration, Object getInterceptor()

Returns the underlying interceptor. If URL patterns are provided the returned type isis MappedInterceptor; otherwise HandlerInterceptor.

Class InterceptorRegistry

Stores and providesHelps with configuring access to a list of interceptors. For each interceptor you can optionally mapped specify one or more URL patterns it applies tointerceptors. @author Rossen Stoyanchev @author Keith Donald Donald @since 3.1
Class InterceptorRegistry, InterceptorRegistration addInterceptor(HandlerInterceptor)

Adds the provided HandlerInterceptor. @param interceptor the interceptor to add @return An InterceptorRegistration that allows you optionally configure the the registered interceptor further for example adding URL patterns it should apply to.
Class InterceptorRegistry, InterceptorRegistration addWebRequestInterceptor(WebRequestInterceptor)

Adds the provided WebRequestInterceptor. @param interceptor the interceptor to add @return An InterceptorRegistration that allows you optionally configure the the registered interceptor further for example adding URL patterns it should apply to.

Class WebMvcConfigurationSupport

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:

Both the RequestMappingHandlerAdapter and the ExceptionHandlerExceptionResolver are configured with default instances of the following kind, unless custom instances areby provideddefault:

@see EnableWebMvc @see WebMvcConfigurer @see WebMvcConfigurerAdapter @author Rossen Stoyanchev @since 3.1
Class WebMvcConfigurationSupport, void addDefaultHandlerExceptionResolvers(List<HandlerExceptionResolver>)

A method available to subclasses for adding default default HandlerExceptionResolvers.

Adds the following exception resolvers:

Class WebMvcConfigurationSupport, FormattingConversionService mvcConversionService()

ReturnsReturn a FormattingConversionService for use with annotated controller methods and the {@code spring:eval} JSP tag. Also see .addFormatters as an alternative to overriding this method.
Class WebMvcConfigurationSupport, Validator mvcValidator()

ReturnsReturn a global Validator instance for example for validating {@code @ModelAttribute} and {@code @RequestBody} method arguments. Delegates to .getValidator() first and if that returns {@code null} checks the classpath for the presence of a JSR-303 implementations before creating a {@code LocalValidatorFactoryBean}.If a JSR-303 implementation is not available, a no-op Validator is returned.

Class WebMvcConfigurer

Defines callback methods to customize the Java-based configuration forfor Spring MVC enabled via {@code @EnableWebMvc}.

{@code @EnableWebMvc}-annotated configuration classes may implement implement this interface to be called back and given a chance to customize the default configuration. Consider extending WebMvcConfigurerAdapter, which provides a stub implementation of all interface methods. @author Rossen Stoyanchev @author Keith Donald @author David Syer @since 3.1

Class WebMvcConfigurer, void addArgumentResolvers(List<HandlerMethodArgumentResolver>)

Add resolvers to support custom controller method argument types.

This does not override the built-in support for resolving handler handler method arguments. To customize the built-in support for argument argument resolution, configure RequestMappingHandlerAdapter directly. @param argumentResolvers initially an empty list

Class WebMvcConfigurer, void addFormatters(FormatterRegistry)

Add Converters and Formatters in addition to the onesones registered by default.
Class WebMvcConfigurer, void addInterceptors(InterceptorRegistry)

Add Spring MVC lifecycle interceptors for pre- and post-processing of of controller method invocations. Interceptors can be registered to apply apply to all requests or be limited to a subset of URL patterns.
Class WebMvcConfigurer, void addResourceHandlers(ResourceHandlerRegistry)

Add handlers to serve static resources such as images, js, and, csscss files from specific locations under web application root, the classpath, and others.
Class WebMvcConfigurer, void addReturnValueHandlers(List<HandlerMethodReturnValueHandler>)

Add handlers to support custom controller method return value types.

Using this option does not override the built-in support for handling return values. To customize the built-in support for handling return return values, configure RequestMappingHandlerAdapter directly. @param returnValueHandlers initially an empty list

Class WebMvcConfigurer, void addViewControllers(ViewControllerRegistry)

Add view controllers to create a direct mapping between a URL path andand view name without the need for a controller in between.
Class WebMvcConfigurer, void configureDefaultServletHandling(DefaultServletHandlerConfigurer)

Configure a handler to delegate unhandled requests by forwarding to the the Servlet container's "default" servlet. A common use case for this is when the DispatcherServlet is mapped to "/" thus overriding the the Servlet container's default handling of static resources.
Class WebMvcConfigurer, void configureHandlerExceptionResolvers(List<HandlerExceptionResolver>)

Configure the HandlerExceptionResolvers to handle unresolvedunresolved controller exceptions. If no resolvers are added to the list, default exception resolvers are added instead. @param exceptionResolvers initially an empty list

Class WebMvcConfigurerAdapter

An convenient baseimplementation of classWebMvcConfigurer with empty method implementationsmethods allowing ofsub-classes WebMvcConfigurerto override only the methods they're interested in. @author Rossen Stoyanchev @since 3.1