类 MultipartConfigFactory
java.lang.Object
org.springframework.boot.web.servlet.MultipartConfigFactory
Factory that can be used to create a
MultipartConfigElement
.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Create a newMultipartConfigElement
instance.void
setFileSizeThreshold
(DataSize fileSizeThreshold) Sets thesize
threshold after which files will be written to disk.void
setLocation
(String location) Sets the directory location where files will be stored.void
setMaxFileSize
(DataSize maxFileSize) Sets the maximumsize
allowed for uploaded files.void
setMaxRequestSize
(DataSize maxRequestSize) Sets the maximumDataSize
allowed for multipart/form-data requests.
-
构造器详细资料
-
MultipartConfigFactory
public MultipartConfigFactory()
-
-
方法详细资料
-
setLocation
Sets the directory location where files will be stored.- 参数:
location
- the location
-
setMaxFileSize
Sets the maximumsize
allowed for uploaded files.- 参数:
maxFileSize
- the maximum file size
-
setMaxRequestSize
Sets the maximumDataSize
allowed for multipart/form-data requests.- 参数:
maxRequestSize
- the maximum request size
-
setFileSizeThreshold
Sets thesize
threshold after which files will be written to disk.- 参数:
fileSizeThreshold
- the file size threshold
-
createMultipartConfig
Create a newMultipartConfigElement
instance.- 返回:
- the multipart config element
-