@Bean
 public MultipartResolver multipartResolver() {
   CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
   multipartResolver.setMaxUploadSize(5 * 1024 * 1024);
   multipartResolver.setMaxInMemorySize(1024 * 1024);
   return multipartResolver;
 }
Пример #2
0
 // Makes sure you can upload files. (used for the images)
 @Bean(name = "multipartResolver")
 public CommonsMultipartResolver getCommonsMultipartResolver() {
   CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
   multipartResolver.setMaxUploadSize(20971520); // 20MB
   multipartResolver.setMaxInMemorySize(1048576); // 1MB
   return multipartResolver;
 }
 @Bean(name = "multipartResolver")
 public CommonsMultipartResolver createMultipartResolver() {
   CommonsMultipartResolver resolver = new CommonsMultipartResolver();
   resolver.setMaxUploadSizePerFile(2048000); // 2MB	
   resolver.setMaxInMemorySize(2048000);
   resolver.setDefaultEncoding("utf-8");
   return resolver;
 }
 @Bean(name = "multipartResolver")
 public MultipartResolver getMultipartResolver() {
   CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
   multipartResolver.setMaxUploadSize(10240000);
   multipartResolver.setDefaultEncoding("UTF-8");
   multipartResolver.setMaxInMemorySize(8192);
   return multipartResolver;
 }