From 87ce0ec2f1c293bebdf4a015703406359acaede5 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Sun, 11 Dec 2016 20:24:36 +0700 Subject: Multipart resolver --- .../main/java/com/juick/api/configuration/ApiMvcConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-api/src/main/java') diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiMvcConfiguration.java b/juick-api/src/main/java/com/juick/api/configuration/ApiMvcConfiguration.java index 5a953c1f..37c07434 100644 --- a/juick-api/src/main/java/com/juick/api/configuration/ApiMvcConfiguration.java +++ b/juick-api/src/main/java/com/juick/api/configuration/ApiMvcConfiguration.java @@ -8,6 +8,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; @@ -40,8 +41,9 @@ public class ApiMvcConfiguration extends WebMvcConfigurationSupport { converters.add(converter); super.configureMessageConverters(converters); } + @Bean - public CommonsMultipartResolver multipartResolver() { + public MultipartResolver multipartResolver() { CommonsMultipartResolver resolver = new CommonsMultipartResolver(); resolver.setMaxUploadSize(10000000); return resolver; -- cgit v1.2.3