Generated by
JDiff

org.springframework.web.bind.annotation Documentation Differences

This file contains all the changes in documentation in the package org.springframework.web.bind.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 CookieValue

Annotation which indicates that a method parameter should be bound to an HTTP cookie. Supported for annotated handler methods in Servlet and Portlet environments.

The method parameter may be declared as type javax.servlet.http.Cookie or as cookie value type (String, int, etc). @author Juergen Hoeller @since 3.0 @see RequestMapping @see RequestParam @see RequestHeader @see org.springframework.web.bind.annotation.RequestMapping @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter


Class ExceptionHandler

Annotation for handling exceptions in specific handler classes and/or handler methods. Provides consistent style between Servlet and Portlet environments, with the semantics adapting to the concrete environment.

Handler methods which are annotated with this annotation are allowed to have very flexible signatures. They may have arguments of the following types, in arbitrary order:

The following return types are supported for handler methods:

In Servlet environments, you can combine the {@code ExceptionHandler} annotation with @ResponseStatus, to define the response status for the HTTP response.

Note: In Portlet environments, {@code ExceptionHandler} annotated methods will only be called during the render and resource phases - just like org.springframework.web.portlet.HandlerExceptionResolver beans would. Exceptions carried over from the action and event phases will be invoked during the render phase as well, with exception handler methods having to be present on the controller class that defines the applicable render method. @author Arjen Poutsma @author Juergen Hoeller @since 3.0 @see org.springframework.web.context.request.WebRequest @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver


Class PathVariable

Annotation which indicates that a method parameter should be bound to a URI template variable. Supported for RequestMapping annotated handler methods in Servlet environments. @author Arjen Poutsma @see RequestMapping @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter @since 3.0

Class RequestBody

Annotation indicating a method parameter should be bound to the body of the web request. The body of the request is passed through an HttpMessageConverter to resolve the the method argument depending on the content type of the request. Optionally, automaticautomatic validation can be applied by annotating the argument with {@code @Valid}.

Supported for annotated handler methods in Servlet environments. @author Arjen Poutsma @see RequestHeader @see ResponseBody @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter @since 3.0


Class RequestHeader

Annotation which indicates that a method parameter should be bound to a web request header. Supported for annotated handler methods in Servlet and Portlet environments. @author Juergen Hoeller @since 3.0 @see RequestMapping @see RequestParam @see CookieValue @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter

Class RequestMapping

Annotation for mapping web requests onto specific handler classes and/or handler methods. Provides a consistent style between Servlet and Portlet environments, with the semantics adapting to the concrete environment.

NOTE: The set of features supported for Servlets is a superset of the set of features supported for Portlets. The places where this applies are marked with the label "Servlet-only" in this source file. For Servlet environments there are some further distinctions depending on whether an application is configured with {@literal "@MVC 3.0"} or {@literal "@MVC 3.1"} support classes. The places where this applies are marked with {@literal "@MVC 3.1-only"} in this source file. For more details see the note on the new support classes added in Spring MVC 3.1 further below.

Handler methods which are annotated with this annotation are allowed to have very flexible signatures. They may have arguments of the following types, in arbitrary order (except for validation results, which need to follow right after the corresponding command object, if desired):

The following return types are supported for handler methods:

NOTE: @RequestMapping will only be processed if an an appropriate HandlerMapping-HandlerAdapter pair is configured. This is the case by default in both the DispatcherServlet and the DispatcherPortlet. However, if you are defining custom HandlerMappings or HandlerAdapters, then you need to add DefaultAnnotationHandlerMapping and AnnotationMethodHandlerAdapter to your configuration..

NOTE: Spring 3.1 introduced a new set of support classes for @RequestMapping methods in Servlet environments called RequestMappingHandlerMapping and RequestMappingHandlerAdapter. They are recommended for use and even required to take advantage of new features in Spring MVC 3.1 (search {@literal "@MVC 3.1-only"} in this source file) and going forward. The new support classes are enabled by default from the MVC namespace and with use of the MVC Java config (@EnableWebMvc) but must be configured explicitly if using neither.

NOTE: When using controller interfaces (e.g. for AOP proxying), make sure to consistently put all your mapping annotations - such as @RequestMapping and @SessionAttributes - on the controller interface rather than on the implementation class. @author Juergen Hoeller @author Arjen Poutsma @author Sam Brannen @since 2.5 @see RequestParam @see ModelAttribute @see SessionAttributes @see InitBinder @see org.springframework.web.context.request.WebRequest @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodMapping @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.portlet.mvc.annotation.DefaultAnnotationHandlerMapping @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter


Class RequestMethod

Java 5 enumeration of HTTP request methods. Intended for use with the RequestMapping.method() attribute of the RequestMapping annotation.

Note that, by default, org.springframework.web.servlet.DispatcherServlet supports GET, HEAD, POST, PUT, PATCH and DELETE only. DispatcherServlet will process TRACE and OPTIONS with the default HttpServlet behavior unless explicitly told to dispatch those request types as well: Check out the "dispatchOptionsRequest" and "dispatchTraceRequest" properties, switching them to "true" if necessary. @author Juergen Hoeller @since 2.5 @see RequestMapping @see org.springframework.web.servlet.DispatcherServlet#setDispatchOptionsRequest @see org.springframework.web.servlet.DispatcherServlet#setDispatchTraceRequest


Class RequestParam

Annotation which indicates that a method parameter should be bound to a web request parameter. Supported for annotated handler methods in Servlet and Portlet environments.

If the method parameter type is Map and a request parameter name is specified, then the request parameter value is converted to a Map assuming an appropriate conversion strategy is available.

If the method parameter is Map<String, String> or MultiValueMap<String, String> and a parameter name is not specified, then the map parameter is populated with all request parameter names and values. @author Arjen Poutsma @author Juergen Hoeller @since 2.5 @see RequestMapping @see RequestHeader @see CookieValue @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMethodAdapter RequestMappingHandlerAdapter @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter