Java 类org.springframework.boot.context.embedded.MultipartConfigFactory 实例源码

项目:graphql-spring-boot    文件:GraphQLWebAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(MultipartConfigElement.class)
public MultipartConfigElement multipartConfigElement(GraphQLProperties graphQLProperties) {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize(DEFAULT_UPLOAD_MAX_FILE_SIZE);
    factory.setMaxRequestSize(DEFAULT_UPLOAD_MAX_REQUEST_SIZE);

    String temp = graphQLProperties.getServer().getUploadMaxFileSize();
    if (StringUtils.hasText(temp))
        factory.setMaxFileSize(temp);

    temp = graphQLProperties.getServer().getUploadMaxRequestSize();
    if (StringUtils.hasText(temp))
        factory.setMaxRequestSize(temp);

    return factory.createMultipartConfig();
}
项目:contestparser    文件: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();
}
项目:uckefu    文件:Application.java   
@Bean   
public MultipartConfigElement multipartConfigElement() {   
        MultipartConfigFactory factory = new MultipartConfigFactory();  
        factory.setMaxFileSize("50MB"); //KB,MB  
        factory.setMaxRequestSize("100MB");   
        return factory.createMultipartConfig();   
}
项目:stats-alfresco-on-database    文件:SaodApplication.java   
@Bean
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("51200KB"); // 50MB
    factory.setMaxRequestSize("256000KB");
    return factory.createMultipartConfig();
}
项目:discoursedb-core    文件:RestConfiguration.java   
@Bean
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("50MB");
    factory.setMaxRequestSize("50MB");
    return factory.createMultipartConfig();
}
项目:erudio-api-oauth2    文件:DatabaseConfig.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("5120KB");
    factory.setMaxRequestSize("5120KB");
    return factory.createMultipartConfig();
}
项目:contestparser    文件:DispatcherServletAutoConfigurationTests.java   
@Bean
public MultipartConfigElement multipartConfig() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128KB");
    factory.setMaxRequestSize("128KB");
    return factory.createMultipartConfig();
}
项目:egd-web    文件:MultipartConfigurer.java   
@Bean(name = "multipartConfigElement")
public MultipartConfigElement multipartConfigElement() {
    log.debug("New instance of " + MultipartConfigFactory.class);
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setLocation(System.getProperty("java.io.tmpdir"));
    factory.setMaxRequestSize("128MB");
    return factory.createMultipartConfig();
}
项目:LivingDocumentsServer    文件:CoreConfig.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setMaxRequestSize("128MB");
    return factory.createMultipartConfig();
}
项目:commandline-hero    文件:Starter.java   
@Bean
MultipartConfigElement multipartConfigElement() {
    final MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("1024MB");
    factory.setMaxRequestSize("1024MB");
    return factory.createMultipartConfig();
}
项目:your-all-in-one    文件:MvcConfig.java   
@Bean
MultipartConfigElement multipartConfigElement() {
    // spring-config
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize(System.getProperty("yaio.server.maxfilesize", "128kb"));
    factory.setMaxRequestSize(System.getProperty("yaio.server.maxrequestsize", "128kb"));
    MultipartConfigElement config = factory.createMultipartConfig();

    // tomcat-config
    FileUploadBase tomcatConfig = new FileUpload();
    tomcatConfig.setFileSizeMax(config.getMaxFileSize());
    tomcatConfig.setSizeMax(config.getMaxFileSize());

    return config;
}
项目:clamav-rest    文件:Application.java   
@Bean
MultipartConfigElement multipartConfigElement() {
  MultipartConfigFactory factory = new MultipartConfigFactory();
  factory.setMaxFileSize(maxfilesize);
  factory.setMaxRequestSize(maxrequestsize);
  return factory.createMultipartConfig();
}
项目:ditop_server    文件:Main.java   
@Bean
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("10000KB");
    factory.setMaxRequestSize("10000KB");
    return factory.createMultipartConfig();
}
项目:SpringClips    文件:ApplicationConfiguration.java   
@Bean
public MultipartConfigElement multipartConfigElement() {
    final MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setMaxRequestSize("128MB");

    return factory.createMultipartConfig();
}
项目:spring-boot-freemarker-showcase    文件:SiteConfig.java   
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("100MB");
    factory.setMaxRequestSize("100MB");
    return factory.createMultipartConfig();
}