Fix spring.factories so MultipartAutoConfigure loads propertly [BS-157]

After discovering that MultipartAutoConfigure wasn't loading when used,
realized I needed to register it with spring.factories. Added it there,
but it broke some tests. So tweaked it so that it only loads if the
specified bean is detected.
This commit is contained in:
Greg Turnquist 2013-06-20 14:32:49 -04:00
parent 13d2422f19
commit a99809f5f7
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ import org.springframework.web.multipart.support.StandardServletMultipartResolve
* @author Greg Turnquist
*/
@Configuration
@ConditionalOnBean(MultipartConfigElement.class)
public class MultipartAutoConfiguration {
@Bean

View File

@ -10,6 +10,7 @@ org.springframework.bootstrap.autoconfigure.orm.jpa.HibernateJpaAutoConfiguratio
org.springframework.bootstrap.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\
org.springframework.bootstrap.autoconfigure.web.EmbeddedServletContainerAutoConfiguration,\
org.springframework.bootstrap.autoconfigure.web.ServerPropertiesAutoConfiguration,\
org.springframework.bootstrap.autoconfigure.web.MultipartAutoConfiguration,\
org.springframework.bootstrap.autoconfigure.web.WebMvcAutoConfiguration
# Application Context Initializers