Polish MultipartConfigElement support

Polish MultipartConfigElement changes introduced in commit e8e59ea6
as follows:

- Fix javadoc formatting
- Fix tab/spaces formatting
- Fix asciidoc formatting
- Move creation of MultipartConfigElement into MultipartProperties
- Add @Since tags
- Restore random port in tests
This commit is contained in:
Phillip Webb
2014-04-25 14:41:36 +01:00
parent 3e3d1e837b
commit 1ae91a135c
4 changed files with 131 additions and 93 deletions

View File

@@ -726,22 +726,24 @@ then you can take control completely and do everything manually using
See the {sc-spring-boot-autoconfigure}/web/WebMvcAutoConfiguration.{sc-ext}[`WebMvcAutoConfiguration`]
source code for more details.
[[howto-multipart-file-upload-configuration]]
=== Handling Multipart File Uploads
Spring Boot embraces the Servlet 3 `javax.servlet.http.Part` API to support uploading files. By default
Spring Boot configures Spring MVC with a maximum file of 1Mb per
file and a maximum of 10Mb of file data in a single request. You may override these values, as well as the location
to which intermediate data is stored (e.g., to the `/tmp` directory) and the threshold past which data is flushed to
disk by using the properties exposed in the `MultipartAutoConfiguration` class. If you want to specify that files be unlimited,
for example, set the `multipart.maxFileSize` property to `-1`.
The multipart support is helpful when you want to receive multipart encoded file data as a `@RequestParam`-annotated
parameter of type `MultipartFile` in a Spring MVC controller handler method.
See the {sc-spring-boot-autoconfigure}/web/MultipartAutoConfiguration.{sc-ext}[`MultipartAutoConfiguration`] source for more details.
Spring Boot embraces the Servlet 3 `javax.servlet.http.Part` API to support uploading
files. By default Spring Boot configures Spring MVC with a maximum file of 1Mb per
file and a maximum of 10Mb of file data in a single request. You may override these
values, as well as the location to which intermediate data is stored (e.g., to the `/tmp`
directory) and the threshold past which data is flushed to disk by using the properties
exposed in the `MultipartProperties` class. If you want to specify that files be
unlimited, for example, set the `multipart.maxFileSize` property to `-1`.
The multipart support is helpful when you want to receive multipart encoded file data as
a `@RequestParam`-annotated parameter of type `MultipartFile` in a Spring MVC controller
handler method.
See the {sc-spring-boot-autoconfigure}/web/MultipartAutoConfiguration.{sc-ext}[`MultipartAutoConfiguration`] s
ource for more details.