@ -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 < ApplicationContextInitializer < ? > > initializers ,
WebMergedContextConfiguration webConfiguration ) {
MockServletContext servletContext = new MockServletContext (
webConfiguration . getResourceBasePath ( ) ) ;
webConfiguration . getResourceBasePath ( ) ,
new FileSystemResourceLoader ( ) ) ;
initializers . add ( 0 , new ServletContextApplicationContextInitializer (
servletContext ) ) ;
}