|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.web.servlet.mvc.method.annotation
as colored differences. Deletions are shownlike 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.
A base class for resolving method argument values by reading from the bodyofof a requestwith HttpMessageConverters. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
An AbstractHandlerMethodExceptionResolver that resolves exceptions through {@code @ExceptionHandler} methods.Class ExceptionHandlerExceptionResolver, ModelAndView doResolveHandlerMethodException(HttpServletRequest, HttpServletResponse, HandlerMethod, Exception)Support for custom argument and return value types can be added via .setCustomArgumentResolvers and .setCustomReturnValueHandlers. Or alternatively to re-configure all argument and return value types use .setArgumentResolvers and .setReturnValueHandlers(List).
@author Rossen Stoyanchev @since 3.1
Find an {@code @ExceptionHandler} method and invoke it to handle theClass ExceptionHandlerExceptionResolver, HandlerMethodArgumentResolverComposite getArgumentResolvers()raised exception.
Return the configured argument resolvers, or possibly {@code null}Class ExceptionHandlerExceptionResolver, List<HandlerMethodReturnValueHandler> getDefaultReturnValueHandlers()ififnot initialized yet via .afterPropertiesSet().
Return the list of return value handlers to use including built-inClass ExceptionHandlerExceptionResolver, ServletInvocableHandlerMethod getExceptionHandlerMethod(HandlerMethod, Exception)andandcustom handlers provided via .setReturnValueHandlers.
FindClass ExceptionHandlerExceptionResolver, HandlerMethodReturnValueHandlerComposite getReturnValueHandlers()thean {@code @ExceptionHandler} method for the given exception.Thedefaultdefault implementation searches@ExceptionHandlermethodsin the class hierarchy of themethod that raised thecontroller first and ifexceptionnot found, it continues searching for additional {@code @ExceptionHandler} methods assuming some ControllerAdvice @ControllerAdvice Spring-managed beans were detected. @param handlerMethod the method where the exception wasraisedraised, possibly {@code null} @param exception the raised exception @return a method to handle the exception, or {@code null}
Return the configured handlers, or possibly {@code null} ifClass ExceptionHandlerExceptionResolver, void setCustomArgumentResolvers(List<HandlerMethodArgumentResolver>)notnotinitialized yet via .afterPropertiesSet().
Provide resolvers for custom argument types. Custom resolvers are ordered after built-in ones. To override the built-in support forClass ExceptionHandlerExceptionResolver, void setReturnValueHandlers(List<HandlerMethodReturnValueHandler>)argumentargument resolution use .setArgumentResolvers instead.
Configure the complete list of supported return value typesthusthusoverriding handlers that would otherwise be configured by default.
Resolves method arguments annotated with an @PathVariable.An @PathVariable is a named value that gets resolved from a
URIURI template variable. It is alwaysrequired and does not have a defaultvaluevalue to fall back on. See the baseclassclassorg.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver for more information on how named values are processed.If the method parameter type is Map, the name specified in the annotation is used to resolve the URI variable String value. The value is then converted to a Map via
type conversion assuming a suitable Converter or PropertyEditor has been registered. Or if the annotation does not specify name the RequestParamMapMethodArgumentResolver is used instead to provide access to all URI variables in a map.A WebDataBinder is invoked to apply type conversion to resolved path variable values
thatthat don't yet match the method parameter type.@author Rossen Stoyanchev @author Arjen Poutsma @since 3.1
Provide a custom method-level request condition. The custom RequestCondition can be of any type so long as the same condition type is returned from all calls to this method in order to ensure custom request conditions can be combined and compared.Class RequestMappingHandlerMapping, RequestCondition<?> getCustomTypeCondition(Class<?>)Consider extending AbstractRequestCondition for custom condition types and using CompositeRequestCondition to provide multiple custom conditions.
@param method the handler method for which to create the condition @return the condition, or {@code null}
Provide a custom type-level request condition. The custom RequestCondition can be of any type so long as the same condition type is returned from all calls to this method in order to ensure custom request conditions can be combined and compared.Consider extending AbstractRequestCondition for custom condition types and using CompositeRequestCondition to provide multiple custom conditions.
@param handlerType the handler type for which to create the condition @return the condition, or {@code null}
Resolves the following method arguments:
- Annotated with {@code @RequestPart}
- Of type MultipartFile in conjunction with Spring'
ssMultipartResolver abstraction- Of type {@code javax.servlet.http.Part} in conjunction
withwith Servlet 3.0 multipart requestsWhen a parameter is annotated with {@code @RequestPart} the content of
thethe part is passed through an HttpMessageConverter to resolve themethodmethod argument with the 'Content-Type' of the request part in mind. Thisisis analogous to what @RequestBody does to resolve an argument based on the content of a regular request.When a parameter is not annotated or the name of the part is not specified,
it is derived from the name of the method argument.Automatic validation may be applied if the argument is annotated
withwith {@code @javax.validation.Valid}. In case of validation failure,aa MethodArgumentNotValidException is raised and a 400 response status code returned if DefaultHandlerExceptionResolver is configured.@author Rossen Stoyanchev @since 3.1
Resolves method arguments annotated with {@code @RequestBody} andhandleshandlesreturn values from methods annotated with {@code @ResponseBody} by reading and writing to the body of the request or response withanan HttpMessageConverter.An {@code @RequestBody} method argument is also validated if it
isis annotated with {@code @javax.validation.Valid}. In case ofvalidationvalidation failure, MethodArgumentNotValidException is raised andresultsresults in a 400 response status code if DefaultHandlerExceptionResolver is configured.@author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
A Servlet-specific org.springframework.web.method.annotation.ModelAttributeMethodProcessor that applies data binding through a WebDataBinder of type ServletRequestDataBinder.Class ServletModelAttributeMethodProcessor, constructor ServletModelAttributeMethodProcessor(boolean)Also adds a fall-back strategy to instantiate the model attribute from a URI template variable or from a request parameter if the name matches the model attribute name and there is an appropriate type conversion strategy. @author Rossen Stoyanchev @since 3.1
@param annotationNotRequired if "true", non-simple method arguments and return values are considered model attributes with or withoutClass ServletModelAttributeMethodProcessor, Object createAttribute(String, MethodParameter, WebDataBinderFactory, NativeWebRequest)aa{@code @ModelAttribute} annotation.
Instantiate the model attribute from a URI template variable or from a request parameter if the name matches to the model attribute name and if there is an appropriate type conversion strategy. If none of these are true delegate back to the base class. @see #Class ServletModelAttributeMethodProcessor, Object createAttributeFromRequestValue(String, String, MethodParameter, WebDataBinderFactory, NativeWebRequest)createAttributeFromUriValuecreateAttributeFromRequestValue(String, String, MethodParameter, WebDataBinderFactory, NativeWebRequest)
Create a model attribute from a String request value (e.g. URI template variable, request parameter) using type conversion.Class ServletModelAttributeMethodProcessor, String getRequestValueForAttribute(String, NativeWebRequest)The default implementation converts only if there a
registeredregisteredConverter that can perform the conversion. @param sourceValue the source value to create the model attribute from @param attributeName the name of the attribute, never {@code null} @param parameter the method parameter @param binderFactory for creating WebDataBinder instance @param request the current request @return the created model attribute, or {@code null} @throws Exception
Obtain a value from the request that may be used to instantiate the model attribute through type conversion from String to the target type.The default implementation looks for the attribute name to match a URI variable first and then a request parameter. @param attributeName the model attribute name @param request the current request @return the request value to try to convert or {@code null}