From 8391897a942482e4556c7cb658635680e58f0416 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 24 Nov 2022 12:00:19 +0100 Subject: [PATCH] Document removal of CommonsMultipartResolver in MVC setup documentation Closes gh-29562 --- .../src/docs/asciidoc/web/webmvc.adoc | 27 +++---------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/framework-docs/src/docs/asciidoc/web/webmvc.adoc b/framework-docs/src/docs/asciidoc/web/webmvc.adoc index 1c72cf68f6e7..5c6015a29bf0 100644 --- a/framework-docs/src/docs/asciidoc/web/webmvc.adoc +++ b/framework-docs/src/docs/asciidoc/web/webmvc.adoc @@ -1141,9 +1141,10 @@ request with a simple request parameter. [.small]#<># `MultipartResolver` from the `org.springframework.web.multipart` package is a strategy -for parsing multipart requests including file uploads. There is one implementation -based on https://commons.apache.org/proper/commons-fileupload[Commons FileUpload] and -another based on Servlet multipart request parsing. +for parsing multipart requests including file uploads. There is a container-based +`StandardServletMultipartResolver` implementation for Servlet multipart request parsing. +Note that the outdated `CommonsMultipartResolver` based on Apache Commons FileUpload is +not available anymore, as of Spring Framework 6.0 with its new Servlet 5.0+ baseline. To enable multipart handling, you need to declare a `MultipartResolver` bean in your `DispatcherServlet` Spring configuration with a name of `multipartResolver`. @@ -1153,26 +1154,6 @@ content wraps the current `HttpServletRequest` as a `MultipartHttpServletRequest provide access to resolved files in addition to exposing parts as request parameters. -[[mvc-multipart-resolver-commons]] -==== Apache Commons `FileUpload` - -To use Apache Commons `FileUpload`, you can configure a bean of type -`CommonsMultipartResolver` with a name of `multipartResolver`. You also need to have -the `commons-fileupload` jar as a dependency on your classpath. - -This resolver variant delegates to a local library within the application, providing -maximum portability across Servlet containers. As an alternative, consider standard -Servlet multipart resolution through the container's own parser as discussed below. - -[NOTE] -==== -Commons FileUpload traditionally applies to POST requests only but accepts any -`multipart/` content type. See the -{api-spring-framework}/web/multipart/commons/CommonsMultipartResolver.html[`CommonsMultipartResolver`] -javadoc for details and configuration options. -==== - - [[mvc-multipart-resolver-standard]] ==== Servlet Multipart Parsing