Java 类org.springframework.boot.web.servlet.MultipartConfigFactory 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MultipartProperties.java   
/**
 * 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();
}
项目:spring-boot-concourse    文件:MultipartProperties.java   
/**
 * 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();
}
项目:personspringclouddemo    文件:PersonApplication.java   
@Bean
public MultipartConfigElement multipartConfigElement(){
    MultipartConfigFactory factory=new MultipartConfigFactory();
    factory.setMaxFileSize("1MB");
    factory.setMaxRequestSize("2MB");
    return factory.createMultipartConfig();
}
项目:RedisClusterManager    文件:FileUploadController.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setMaxRequestSize("500MB");
    return factory.createMultipartConfig();
}
项目:ait-platform    文件:AitZuulServer.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("10MB");
    factory.setMaxRequestSize("10MB");
    return factory.createMultipartConfig();
}
项目:springBoot-swagger-mybatis-shardbatis    文件:Application.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("5MB");
    factory.setMaxRequestSize("5MB");
    return factory.createMultipartConfig();
}
项目:springBoot    文件:MultipartConfig.java   
@Bean
public MultipartConfigElement multipartConfigElement(){
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("256MB");
    factory.setMaxRequestSize("256MB");
    return factory.createMultipartConfig();
}
项目:springBoot    文件:MultipartConfig.java   
@Bean
public MultipartConfigElement multipartConfigElement(){
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("10MB");
    factory.setMaxRequestSize("10MB");
    return factory.createMultipartConfig();
}
项目:springBoot    文件:MultipartConfig.java   
@Bean
public MultipartConfigElement multipartConfigElement(){
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("10MB");
    factory.setMaxRequestSize("10MB");
    return factory.createMultipartConfig();
}
项目:SpringbootMybatis    文件:Application.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("5MB");
    factory.setMaxRequestSize("5MB");
    return factory.createMultipartConfig();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DispatcherServletAutoConfigurationTests.java   
@Bean
public MultipartConfigElement multipartConfig() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128KB");
    factory.setMaxRequestSize("128KB");
    return factory.createMultipartConfig();
}
项目:spring-boot-concourse    文件:DispatcherServletAutoConfigurationTests.java   
@Bean
public MultipartConfigElement multipartConfig() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128KB");
    factory.setMaxRequestSize("128KB");
    return factory.createMultipartConfig();
}
项目:java_server    文件:PortraitApplication.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    // 设置文件大小限制 ,超出设置页面会抛出异常信息,
    // 这样在文件上传的地方就需要进行异常信息的处理了;
    factory.setMaxFileSize("100MB"); // KB,MB
    /// 设置总上传数据总大小
    factory.setMaxRequestSize("100MB");
    // Sets the directory location where files will be stored.
    // factory.setLocation("路径地址");
    return factory.createMultipartConfig();
}
项目:EasyEE    文件:MultipartConfiguration.java   
@Bean  
public MultipartConfigElement multipartConfigElement() {  
    MultipartConfigFactory factory = new MultipartConfigFactory();  
    long maxFileSize=524288000; //500MB
    long maxRequestSize=524288000; //500MB
    factory.setMaxFileSize(maxFileSize);
    factory.setMaxRequestSize(maxRequestSize);  
    return factory.createMultipartConfig();  
}
项目:EasyEE    文件:MultipartConfiguration.java   
@Bean  
public MultipartConfigElement multipartConfigElement() {  
    MultipartConfigFactory factory = new MultipartConfigFactory();  
    long maxFileSize=524288000; //500MB
    long maxRequestSize=524288000; //500MB
    factory.setMaxFileSize(maxFileSize);
    factory.setMaxRequestSize(maxRequestSize);  
    return factory.createMultipartConfig();  
}
项目:MLDS    文件:MultipartConfiguration.java   
@Bean
  MultipartConfigElement multipartConfigElement() {
return new MultipartConfigFactory().createMultipartConfig();
  }