@Configuration @ConditionalOnClass(value={javax.servlet.Servlet.class,org.springframework.web.multipart.support.StandardServletMultipartResolver.class,javax.servlet.MultipartConfigElement.class}) @ConditionalOnProperty(prefix="spring.http.multipart", name="enabled", matchIfMissing=true) @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(MultipartProperties multipartProperties) |
Modifier and Type | Method and Description |
---|---|
MultipartConfigElement |
multipartConfigElement() |
StandardServletMultipartResolver |
multipartResolver() |
public MultipartAutoConfiguration(MultipartProperties multipartProperties)
@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.