`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
@@ -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