Don't auto-configure MultipartConfigElement when using Commons FileUpload

Previously, when a user had declared a custom MultipartResolver bean
that is a CommonsMultipartResolver, part resolution would fail. The
failure was occurring as the servlet container was consuming the parts
before CommonsMultipartResolver had a chance to read them. This was
happening because a MultipartConfigElement was being auto-configured.

This commit updates the multipart auto-configuration so that a
MultipartConfigElement is not auto-configured when there is a
CommonsMultipartResolver bean in the context.

Closes gh-7735
This commit is contained in:
Andy Wilkinson
2018-06-20 12:05:23 +01:00
parent 92f62043d4
commit e7b03f7ca3
4 changed files with 35 additions and 2 deletions

View File

@@ -662,6 +662,11 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jms</artifactId>