当前位置: 首页>>代码示例>>Java>>正文


Java MultipartConfigFactory.createMultipartConfig方法代码示例

本文整理汇总了Java中org.springframework.boot.context.embedded.MultipartConfigFactory.createMultipartConfig方法的典型用法代码示例。如果您正苦于以下问题:Java MultipartConfigFactory.createMultipartConfig方法的具体用法?Java MultipartConfigFactory.createMultipartConfig怎么用?Java MultipartConfigFactory.createMultipartConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.boot.context.embedded.MultipartConfigFactory的用法示例。


在下文中一共展示了MultipartConfigFactory.createMultipartConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@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();
}
 
开发者ID:oembedler,项目名称:graphql-spring-boot,代码行数:18,代码来源:GraphQLWebAutoConfiguration.java

示例2: createMultipartConfig

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:21,代码来源:MultipartProperties.java

示例3: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean   
public MultipartConfigElement multipartConfigElement() {   
        MultipartConfigFactory factory = new MultipartConfigFactory();  
        factory.setMaxFileSize("50MB"); //KB,MB  
        factory.setMaxRequestSize("100MB");   
        return factory.createMultipartConfig();   
}
 
开发者ID:uckefu,项目名称:uckefu,代码行数:8,代码来源:Application.java

示例4: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
MultipartConfigElement multipartConfigElement() {
	MultipartConfigFactory factory = new MultipartConfigFactory();
	factory.setMaxFileSize("51200KB"); // 50MB
	factory.setMaxRequestSize("256000KB");
	return factory.createMultipartConfig();
}
 
开发者ID:jeci-sarl,项目名称:stats-alfresco-on-database,代码行数:8,代码来源:SaodApplication.java

示例5: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("50MB");
    factory.setMaxRequestSize("50MB");
    return factory.createMultipartConfig();
}
 
开发者ID:DiscourseDB,项目名称:discoursedb-core,代码行数:8,代码来源:RestConfiguration.java

示例6: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("5120KB");
    factory.setMaxRequestSize("5120KB");
    return factory.createMultipartConfig();
}
 
开发者ID:leandrocgsi,项目名称:erudio-api-oauth2,代码行数:8,代码来源:DatabaseConfig.java

示例7: multipartConfig

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
public MultipartConfigElement multipartConfig() {
	MultipartConfigFactory factory = new MultipartConfigFactory();
	factory.setMaxFileSize("128KB");
	factory.setMaxRequestSize("128KB");
	return factory.createMultipartConfig();
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:8,代码来源:DispatcherServletAutoConfigurationTests.java

示例8: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@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();
}
 
开发者ID:esutoniagodesu,项目名称:egd-web,代码行数:10,代码来源:MultipartConfigurer.java

示例9: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
public MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setMaxRequestSize("128MB");
    return factory.createMultipartConfig();
}
 
开发者ID:learning-layers,项目名称:LivingDocumentsServer,代码行数:8,代码来源:CoreConfig.java

示例10: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
MultipartConfigElement multipartConfigElement() {
	final MultipartConfigFactory factory = new MultipartConfigFactory();
	factory.setMaxFileSize("1024MB");
	factory.setMaxRequestSize("1024MB");
	return factory.createMultipartConfig();
}
 
开发者ID:tmseidel,项目名称:commandline-hero,代码行数:8,代码来源:Starter.java

示例11: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@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;
}
 
开发者ID:das-praktische-schreinerlein,项目名称:your-all-in-one,代码行数:16,代码来源:MvcConfig.java

示例12: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
MultipartConfigElement multipartConfigElement() {
  MultipartConfigFactory factory = new MultipartConfigFactory();
  factory.setMaxFileSize(maxfilesize);
  factory.setMaxRequestSize(maxrequestsize);
  return factory.createMultipartConfig();
}
 
开发者ID:solita,项目名称:clamav-rest,代码行数:8,代码来源:Application.java

示例13: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("10000KB");
    factory.setMaxRequestSize("10000KB");
    return factory.createMultipartConfig();
}
 
开发者ID:HendrikStrobelt,项目名称:ditop_server,代码行数:8,代码来源:Main.java

示例14: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
@Bean
public MultipartConfigElement multipartConfigElement() {
    final MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("128MB");
    factory.setMaxRequestSize("128MB");

    return factory.createMultipartConfig();
}
 
开发者ID:mhmxs,项目名称:SpringClips,代码行数:9,代码来源:ApplicationConfiguration.java

示例15: multipartConfigElement

import org.springframework.boot.context.embedded.MultipartConfigFactory; //导入方法依赖的package包/类
MultipartConfigElement multipartConfigElement() {
    MultipartConfigFactory factory = new MultipartConfigFactory();
    factory.setMaxFileSize("100MB");
    factory.setMaxRequestSize("100MB");
    return factory.createMultipartConfig();
}
 
开发者ID:hosken5,项目名称:spring-boot-freemarker-showcase,代码行数:7,代码来源:SiteConfig.java


注:本文中的org.springframework.boot.context.embedded.MultipartConfigFactory.createMultipartConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。