/**
* Create a new {@link MultipartConfigElement} using the properties.
* @return a new {@link MultipartConfigElement} configured using there properties
*/
public MultipartConfigElement createMultipartConfig() {
MultipartConfigFactory factory = new MultipartConfigFactory();
if (StringUtils.hasText(this.fileSizeThreshold)) {
factory.setFileSizeThreshold(this.fileSizeThreshold);
}
if (StringUtils.hasText(this.location)) {
factory.setLocation(this.location);
}
if (StringUtils.hasText(this.maxRequestSize)) {
factory.setMaxRequestSize(this.maxRequestSize);
}
if (StringUtils.hasText(this.maxFileSize)) {
factory.setMaxFileSize(this.maxFileSize);
}
return factory.createMultipartConfig();
}
MultipartProperties.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:https-github.com-g0t4-jenkins2-course-spring-boot
作者:
评论列表
文章目录