|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packageorg.springframework.web.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.
Abstract base class for resolving method arguments from a named value. Request parameters, request headers,Class AbstractNamedValueMethodArgumentResolver, constructor AbstractNamedValueMethodArgumentResolver(ConfigurableBeanFactory)andand path variables are examples ofnamednamed values. Each may have a name, a required flag, and a default value.Subclasses define how to do the following:
- Obtain named value information for a method parameter
- Resolve names into argument values
- Handle missing argument values when argument values are required
- Optionally handle a resolved value
A default value string can contain ${...} placeholders and Spring
ExpressionExpression Language #{...} expressions.For this to workaa ConfigurableBeanFactory must be supplied to the class constructor.A WebDataBinder is created to apply type conversion to the
resolvedresolved argument value if it doesn'tt match the method parameter type. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1
@param beanFactory a bean factory to use for resolvingClass AbstractNamedValueMethodArgumentResolver, NamedValueInfo createNamedValueInfo(MethodParameter)${...}placeholderplaceholder and #{...} SpELexpressionsexpressions in default values, or {@code null} ifdefaultdefault values are not expected to contain expressions
Create the NamedValueInfo object for the given method parameter. Implementations typically retrieve the method annotation by means of MethodParameter.getParameterAnnotation(Class).Class AbstractNamedValueMethodArgumentResolver, Object resolveName(String, MethodParameter, NativeWebRequest)@param parameter the method parameter @return the named value information
Resolves the given parameter type and value name into an argument value. @param name the name of the value being resolved @param parameter the method parameter to resolve to an argument value @param request the currentrequestrequest @return the resolved argument. May be {@code null} @throws Exception in case of errors
Class ExceptionHandlerMethodResolver, constructor ExceptionHandlerMethodResolver(Class<?>)GivenDiscoversa set ofExceptionHandler @ExceptionHandler methodsatininitialization,afindsgiven classthetype,best matching methodincluding all supermappedtypes, and helps to resolve anexception atException toruntime.themethod its mapped to. Exception mappings areextracteddefinedfrom thethroughmethod{@code @ExceptionHandler} annotation or by lookingforatThrowablethemethodsignaturearguments.ofan {@code @ExceptionHandler} method. @author Rossen Stoyanchev @since 3.1
A constructor that finds ExceptionHandler methods inClass ExceptionHandlerMethodResolver, Method resolveMethod(Exception)athe givenhandlertype. @param handlerType thehandler to inspect for exception handler methods. @throws IllegalStateException If an exceptiontypeis mapped to two methods. @throws IllegalArgumentException If an @ExceptionHandler method is not mappedtoany exceptions.introspect
Find a method to handle the given exception. Use ExceptionDepthComparatorClass ExceptionHandlerMethodResolver, MethodFilter EXCEPTION_HANDLER_METHODSIfif more than one matchis found, the best matchisselected via ExceptionDepthComparatorfound. @param exception the exception @returnan @ExceptionHandlera method,to handle the exception or {@code null}
A filter for selecting {@code @ExceptionHandler} methods.
Whether to raise a BindException onbind orvalidation errors.The@param binder the data binder used to perform data binding @paramdefaultparameter the methodimplementationargumentreturns@return {@code true} if the nextmethodmethod argument is not of type Errors.@param binder the data binder used to perform data binding @param parameter the method argument
Resolves method arguments annotated with @RequestParam, argumentsClass RequestParamMethodArgumentResolver, constructor RequestParamMethodArgumentResolver(ConfigurableBeanFactory, boolean)ofof type MultipartFile in conjunction with Spring's MultipartResolverabstraction, and arguments of type {@code javax.servlet.http.Part} inconjunctionconjunction with Servlet 3.0 multipart requests. This resolver can also be created indefaultdefault resolution mode in which simple types (int, long, etc.) notannotatedannotated with @RequestParam are also treated as request parameters withthethe parameter name derived from the argument name.If the method parameter type is Map, the
request parametername specifiednamein the annotation is used toresolve the request parameter String value. The valueisis then converted to a Mapvia type conversion assuming asuitablesuitable Converter or PropertyEditor hasbeen registered.IfOr if a request parameter name is not specifiedwith a Map method parameter type, thethe RequestParamMapMethodArgumentResolver is used insteadprovidingto provide access to all request parameters in the form of a map.A WebDataBinder is invoked to apply type conversion to resolved
requestrequest header values that don't yet match the method parameter type.@author Arjen Poutsma @author Rossen Stoyanchev @since 3.1 @see RequestParamMapMethodArgumentResolver
@param beanFactory a bean factory used for resolving ${...}Class RequestParamMethodArgumentResolver, boolean supportsParameter(MethodParameter)placeholderplaceholderand #{...} SpEL expressions in default values, or {@code null} ifdefaultdefault values are not expected to contain expressions @param useDefaultResolution in default resolution mode a methodargumentargument that is a simple type, as defined in BeanUtils.isSimpleProperty,is treated as a request parameter even if it itsn't annotated,thethe request parameter name is derived from the method parameter name.
Supports the following:
- @RequestParam-annotated method arguments.
This excludes Map params where the annotation doesn'tt specify a name. See RequestParamMapMethodArgumentResolverinstead for such params.- Arguments of type MultipartFile
unless annotated with @RequestPart.- Arguments of type {@code javax.servlet.http.Part}
unless annotated with @RequestPart.- In default resolution mode, simple type
argumentsarguments even if not with @RequestParam.