diff --git a/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java b/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java index a821c78142..ce60e0a1f4 100644 --- a/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java @@ -39,6 +39,7 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.StandardEnvironment; +import org.springframework.core.io.FileSystemResourceLoader; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfigurationAttributes; import org.springframework.test.context.ContextLoader; @@ -261,7 +262,8 @@ public class SpringApplicationContextLoader extends AbstractContextLoader { List> initializers, WebMergedContextConfiguration webConfiguration) { MockServletContext servletContext = new MockServletContext( - webConfiguration.getResourceBasePath()); + webConfiguration.getResourceBasePath(), + new FileSystemResourceLoader()); initializers.add(0, new ServletContextApplicationContextInitializer( servletContext)); }