@Configuration @ConditionalOnClass(value={javax.servlet.Servlet.class,org.springframework.web.multipart.support.StandardServletMultipartResolver.class,javax.servlet.MultipartConfigElement.class}) @EnableConfigurationProperties(value=MultipartProperties.class) public class MultipartAutoConfiguration extends Object
Auto-configuration
for multi-part uploads. Adds a
StandardServletMultipartResolver
if none is present, and adds a
multipartConfigElement
if none is
otherwise defined. The EmbeddedWebApplicationContext
will associate the
MultipartConfigElement
bean to any Servlet
beans.
The MultipartConfigElement
is a Servlet API that's used to
configure how the container handles file uploads. By default
Constructor and Description |
---|
MultipartAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
MultipartConfigElement |
multipartConfigElement() |
StandardServletMultipartResolver |
multipartResolver() |
@Bean @ConditionalOnMissingBean public MultipartConfigElement multipartConfigElement()
@Bean(name="multipartResolver") @ConditionalOnMissingBean(value=org.springframework.web.multipart.MultipartResolver.class) public StandardServletMultipartResolver multipartResolver()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.