@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 |
---|---|
javax.servlet.MultipartConfigElement |
multipartConfigElement() |
org.springframework.web.multipart.support.StandardServletMultipartResolver |
multipartResolver() |
public MultipartAutoConfiguration(MultipartProperties multipartProperties)
@Bean @ConditionalOnMissingBean(value={javax.servlet.MultipartConfigElement.class,org.springframework.web.multipart.commons.CommonsMultipartResolver.class}) public javax.servlet.MultipartConfigElement multipartConfigElement()
@Bean(name="multipartResolver") @ConditionalOnMissingBean(value=org.springframework.web.multipart.MultipartResolver.class) public org.springframework.web.multipart.support.StandardServletMultipartResolver multipartResolver()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.