diff --git a/spring-core/src/main/java/org/springframework/util/MultiValueMap.java b/spring-core/src/main/java/org/springframework/util/MultiValueMap.java index a8ced8fae3..bab868f5e3 100644 --- a/spring-core/src/main/java/org/springframework/util/MultiValueMap.java +++ b/spring-core/src/main/java/org/springframework/util/MultiValueMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ public interface MultiValueMap extends Map> { void setAll(Map values); /** - * Returns the first values contained in this {@code MultiValueMap}. + * Return a {@code Map} with the first values contained in this {@code MultiValueMap}. * @return a single value representation of this map */ Map toSingleValueMap(); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java index b27bcc16bf..24769ed9d6 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/InvocableHandlerMethod.java @@ -120,7 +120,7 @@ public class InvocableHandlerMethod extends HandlerMethod { } /** - * Get the method argument values for the current request. + * Get the method argument values for the current message. */ private Object[] getMethodArgumentValues(Message message, Object... providedArgs) throws Exception { MethodParameter[] parameters = getMethodParameters(); diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java index 8f27d5c86f..191053cb4e 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,23 +33,24 @@ import org.springframework.web.multipart.MultipartResolver; * Annotation that can be used to associate the part of a "multipart/form-data" request * with a method argument. * - *

Supported method argument types include {@link MultipartFile} - * in conjunction with Spring's {@link MultipartResolver} abstraction, - * {@code javax.servlet.http.Part} in conjunction with Servlet 3.0 multipart requests, - * or otherwise for any other method argument, the content of the part is passed through an - * {@link HttpMessageConverter} taking into consideration the 'Content-Type' header - * of the request part. This is analogous to what @{@link RequestBody} does to resolve - * an argument based on the content of a non-multipart regular request. + *

Supported method argument types include {@link MultipartFile} in conjunction with + * Spring's {@link MultipartResolver} abstraction, {@code javax.servlet.http.Part} in + * conjunction with Servlet 3.0 multipart requests, or otherwise for any other method + * argument, the content of the part is passed through an {@link HttpMessageConverter} + * taking into consideration the 'Content-Type' header of the request part. This is + * analogous to what @{@link RequestBody} does to resolve an argument based on the + * content of a non-multipart regular request. * - *

Note that @{@link RequestParam} annotation can also be used to associate the - * part of a "multipart/form-data" request with a method argument supporting the same - * method argument types. The main difference is that when the method argument is not a - * String, @{@link RequestParam} relies on type conversion via a registered - * {@link Converter} or {@link PropertyEditor} while @{@link RequestPart} relies - * on {@link HttpMessageConverter}s taking into consideration the 'Content-Type' header - * of the request part. @{@link RequestParam} is likely to be used with name-value form - * fields while @{@link RequestPart} is likely to be used with parts containing more - * complex content (e.g. JSON, XML). + *

Note that @{@link RequestParam} annotation can also be used to associate the part + * of a "multipart/form-data" request with a method argument supporting the same method + * argument types. The main difference is that when the method argument is not a String + * or raw {@code MultipartFile} / {@code Part}, {@code @RequestParam} relies on type + * conversion via a registered {@link Converter} or {@link PropertyEditor} while + * {@link RequestPart} relies on {@link HttpMessageConverter HttpMessageConverters} + * taking into consideration the 'Content-Type' header of the request part. + * {@link RequestParam} is likely to be used with name-value form fields while + * {@link RequestPart} is likely to be used with parts containing more complex content + * e.g. JSON, XML). * * @author Rossen Stoyanchev * @author Arjen Poutsma diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java b/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java index a21dd23657..8ebee97cbd 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/MapMethodProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class MapMethodProcessor implements HandlerMethodArgumentResolver, Handle } @Override - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) public void handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java index 8e9c482c01..c35b531b41 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolver.java @@ -38,7 +38,7 @@ import org.springframework.web.method.support.ModelAndViewContainer; * *

The created {@link Map} contains all request parameter name/value pairs. * If the method parameter type is {@link MultiValueMap} instead, the created - * map contains all request parameters and all there values for cases where + * map contains all request parameters and all their values for cases where * request parameters have multiple values. * * @author Arjen Poutsma @@ -59,10 +59,8 @@ public class RequestParamMapMethodArgumentResolver implements HandlerMethodArgum public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) throws Exception { - Class paramType = parameter.getParameterType(); - Map parameterMap = webRequest.getParameterMap(); - if (MultiValueMap.class.isAssignableFrom(paramType)) { + if (MultiValueMap.class.isAssignableFrom(parameter.getParameterType())) { MultiValueMap result = new LinkedMultiValueMap<>(parameterMap.size()); parameterMap.forEach((key, values) -> { for (String value : values) { @@ -81,4 +79,5 @@ public class RequestParamMapMethodArgumentResolver implements HandlerMethodArgum return result; } } + } diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java index 658619526b..f00d22265b 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.method.support.UriComponentsContributor; import org.springframework.web.multipart.MultipartException; import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.multipart.MultipartRequest; import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.support.MissingServletRequestPartException; import org.springframework.web.multipart.support.MultipartResolutionDelegate; @@ -82,6 +82,7 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod /** + * Create a new {@link RequestParamMethodArgumentResolver} instance. * @param useDefaultResolution in default resolution mode a method argument * that is a simple type, as defined in {@link BeanUtils#isSimpleProperty}, * is treated as a request parameter even if it isn't annotated, the @@ -92,6 +93,7 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod } /** + * Create a new {@link RequestParamMethodArgumentResolver} instance. * @param beanFactory a bean factory used for resolving ${...} placeholder * and #{...} SpEL expressions in default values, or {@code null} if default * values are not expected to contain expressions @@ -112,15 +114,11 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod * Supports the following: *

    *
  • @RequestParam-annotated method arguments. - * This excludes {@link Map} params where the annotation doesn't - * specify a name. See {@link RequestParamMapMethodArgumentResolver} - * instead for such params. - *
  • Arguments of type {@link MultipartFile} - * unless annotated with @{@link RequestPart}. - *
  • Arguments of type {@code javax.servlet.http.Part} - * unless annotated with @{@link RequestPart}. - *
  • In default resolution mode, simple type arguments - * even if not with @{@link RequestParam}. + * This excludes {@link Map} params where the annotation does not specify a name. + * See {@link RequestParamMapMethodArgumentResolver} instead for such params. + *
  • Arguments of type {@link MultipartFile} unless annotated with @{@link RequestPart}. + *
  • Arguments of type {@code Part} unless annotated with @{@link RequestPart}. + *
  • In default resolution mode, simple type arguments even if not with @{@link RequestParam}. *
*/ @Override @@ -170,7 +168,7 @@ public class RequestParamMethodArgumentResolver extends AbstractNamedValueMethod } Object arg = null; - MultipartHttpServletRequest multipartRequest = request.getNativeRequest(MultipartHttpServletRequest.class); + MultipartRequest multipartRequest = request.getNativeRequest(MultipartRequest.class); if (multipartRequest != null) { List files = multipartRequest.getFiles(name); if (!files.isEmpty()) { diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java index 717dc58d2d..b4c7e9a812 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class RequestHeaderMapMethodArgumentResolverTests { @Before - public void setUp() throws Exception { + public void setup() throws Exception { resolver = new RequestHeaderMapMethodArgumentResolver(); Method method = getClass().getMethod("params", Map.class, MultiValueMap.class, HttpHeaders.class, Map.class); @@ -135,9 +135,8 @@ public class RequestHeaderMapMethodArgumentResolverTests { public void params(@RequestHeader Map param1, - @RequestHeader MultiValueMap param2, - @RequestHeader HttpHeaders param3, - Map unsupported) { + @RequestHeader MultiValueMap param2, @RequestHeader HttpHeaders param3, + Map unsupported) { } } diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java index a453abb0de..db2e766cde 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java @@ -44,7 +44,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext; import static org.junit.Assert.*; /** - * Test fixture with {@link org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver}. + * Test fixture with {@link RequestHeaderMethodArgumentResolver}. * * @author Arjen Poutsma * @author Rossen Stoyanchev @@ -70,7 +70,7 @@ public class RequestHeaderMethodArgumentResolverTests { @Before @SuppressWarnings("resource") - public void setUp() throws Exception { + public void setup() throws Exception { GenericWebApplicationContext context = new GenericWebApplicationContext(); context.refresh(); resolver = new RequestHeaderMethodArgumentResolver(context.getBeanFactory()); @@ -94,7 +94,7 @@ public class RequestHeaderMethodArgumentResolverTests { } @After - public void teardown() { + public void reset() { RequestContextHolder.resetRequestAttributes(); } diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java index 33b677af19..d2b929197c 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ package org.springframework.web.method.annotation; import java.util.Collections; import java.util.Map; -import org.junit.Before; import org.junit.Test; import org.springframework.core.MethodParameter; @@ -32,10 +31,8 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.ResolvableMethod; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.springframework.web.method.MvcAnnotationPredicates.requestParam; +import static org.junit.Assert.*; +import static org.springframework.web.method.MvcAnnotationPredicates.*; /** * Test fixture with {@link RequestParamMapMethodArgumentResolver}. @@ -45,24 +42,15 @@ import static org.springframework.web.method.MvcAnnotationPredicates.requestPara */ public class RequestParamMapMethodArgumentResolverTests { - private RequestParamMapMethodArgumentResolver resolver; + private RequestParamMapMethodArgumentResolver resolver = new RequestParamMapMethodArgumentResolver(); - private NativeWebRequest webRequest; + private MockHttpServletRequest request = new MockHttpServletRequest(); - private MockHttpServletRequest request; + private NativeWebRequest webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); private ResolvableMethod testMethod = ResolvableMethod.on(getClass()).named("handle").build(); - @Before - public void setUp() throws Exception { - resolver = new RequestParamMapMethodArgumentResolver(); - - request = new MockHttpServletRequest(); - webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); - } - - @Test public void supportsParameter() { MethodParameter param = this.testMethod.annot(requestParam().noName()).arg(Map.class); diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java index eb6513e2f6..6b089ef04f 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import java.util.Map; import java.util.Optional; import javax.servlet.http.Part; -import org.junit.Before; import org.junit.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; @@ -53,7 +52,7 @@ import static org.mockito.BDDMockito.*; import static org.springframework.web.method.MvcAnnotationPredicates.*; /** - * Test fixture with {@link org.springframework.web.method.annotation.RequestParamMethodArgumentResolver}. + * Test fixture with {@link RequestParamMethodArgumentResolver}. * * @author Arjen Poutsma * @author Rossen Stoyanchev @@ -61,23 +60,15 @@ import static org.springframework.web.method.MvcAnnotationPredicates.*; */ public class RequestParamMethodArgumentResolverTests { - private RequestParamMethodArgumentResolver resolver; + private RequestParamMethodArgumentResolver resolver = new RequestParamMethodArgumentResolver(null, true); - private NativeWebRequest webRequest; + private MockHttpServletRequest request = new MockHttpServletRequest(); - private MockHttpServletRequest request; + private NativeWebRequest webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); private ResolvableMethod testMethod = ResolvableMethod.on(getClass()).named("handle").build(); - @Before - public void setup() throws Exception { - resolver = new RequestParamMethodArgumentResolver(null, true); - request = new MockHttpServletRequest(); - webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); - } - - @Test public void supportsParameter() { resolver = new RequestParamMethodArgumentResolver(null, true); @@ -385,7 +376,7 @@ public class RequestParamMethodArgumentResolverTests { WebDataBinderFactory binderFactory = mock(WebDataBinderFactory.class); given(binderFactory.createBinder(webRequest, null, "stringNotAnnot")).willReturn(binder); - this.request.addParameter("stringNotAnnot", ""); + request.addParameter("stringNotAnnot", ""); MethodParameter param = this.testMethod.annotNotPresent(RequestParam.class).arg(String.class); Object arg = resolver.resolveArgument(param, null, webRequest, binderFactory); @@ -400,7 +391,7 @@ public class RequestParamMethodArgumentResolverTests { WebDataBinderFactory binderFactory = mock(WebDataBinderFactory.class); given(binderFactory.createBinder(webRequest, null, "name")).willReturn(binder); - this.request.addParameter("name", ""); + request.addParameter("name", ""); MethodParameter param = this.testMethod.annot(requestParam().notRequired()).arg(String.class); Object arg = resolver.resolveArgument(param, null, webRequest, binderFactory); @@ -426,7 +417,7 @@ public class RequestParamMethodArgumentResolverTests { @Test // SPR-10180 public void resolveEmptyValueToDefault() throws Exception { - this.request.addParameter("name", ""); + request.addParameter("name", ""); MethodParameter param = this.testMethod.annot(requestParam().notRequired("bar")).arg(String.class); Object result = resolver.resolveArgument(param, null, webRequest, null); assertEquals("bar", result); @@ -434,7 +425,7 @@ public class RequestParamMethodArgumentResolverTests { @Test public void resolveEmptyValueWithoutDefault() throws Exception { - this.request.addParameter("stringNotAnnot", ""); + request.addParameter("stringNotAnnot", ""); MethodParameter param = this.testMethod.annotNotPresent(RequestParam.class).arg(String.class); Object result = resolver.resolveArgument(param, null, webRequest, null); assertEquals("", result); @@ -442,7 +433,7 @@ public class RequestParamMethodArgumentResolverTests { @Test public void resolveEmptyValueRequiredWithoutDefault() throws Exception { - this.request.addParameter("name", ""); + request.addParameter("name", ""); MethodParameter param = this.testMethod.annot(requestParam().notRequired()).arg(String.class); Object result = resolver.resolveArgument(param, null, webRequest, null); assertEquals("", result); @@ -459,7 +450,7 @@ public class RequestParamMethodArgumentResolverTests { Object result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.empty(), result); - this.request.addParameter("name", "123"); + request.addParameter("name", "123"); result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.class, result.getClass()); assertEquals(123, ((Optional) result).get()); @@ -492,7 +483,7 @@ public class RequestParamMethodArgumentResolverTests { Object result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.empty(), result); - this.request.addParameter("name", "123", "456"); + request.addParameter("name", "123", "456"); result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.class, result.getClass()); assertArrayEquals(new Integer[] {123, 456}, (Integer[]) ((Optional) result).get()); @@ -525,7 +516,7 @@ public class RequestParamMethodArgumentResolverTests { Object result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.empty(), result); - this.request.addParameter("name", "123", "456"); + request.addParameter("name", "123", "456"); result = resolver.resolveArgument(param, null, webRequest, binderFactory); assertEquals(Optional.class, result.getClass()); assertEquals(Arrays.asList("123", "456"), ((Optional) result).get()); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java index 542795e616..40fa225f52 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java @@ -81,12 +81,13 @@ public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionRes } if (ex.getCause() instanceof Exception) { - ex = (Exception) ex.getCause(); - return doResolveException(request, response, handler, ex); + return doResolveException(request, response, handler, (Exception) ex.getCause()); } } catch (Exception resolveEx) { - logger.warn("ResponseStatus handling resulted in exception", resolveEx); + if (logger.isWarnEnabled()) { + logger.warn("Failure while trying to resolve exception [" + ex.getClass().getName() + "]", resolveEx); + } } return null; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java index 8c826310d7..4efc3febea 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ import org.springframework.web.multipart.support.RequestPartServletServerHttpReq /** * Resolves the following method arguments: *
    - *
  • Annotated with {@code @RequestPart} + *
  • Annotated with @{@link RequestPart} *
  • Of type {@link MultipartFile} in conjunction with Spring's {@link MultipartResolver} abstraction *
  • Of type {@code javax.servlet.http.Part} in conjunction with Servlet 3.0 multipart requests *
@@ -87,11 +87,13 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM /** - * Supports the following: + * Whether the given {@linkplain MethodParameter method parameter} is a multi-part + * supported. Supports the following: *
    *
  • annotated with {@code @RequestPart} *
  • of type {@link MultipartFile} unless annotated with {@code @RequestParam} - *
  • of type {@code javax.servlet.http.Part} unless annotated with {@code @RequestParam} + *
  • of type {@code javax.servlet.http.Part} unless annotated with + * {@code @RequestParam} *
*/ @Override