From 3ffae1a1ec624e4430d1158c99daef51fc7efdc4 Mon Sep 17 00:00:00 2001 From: Jon Brisbin Date: Thu, 27 Sep 2012 15:51:36 -0500 Subject: [PATCH] Added default servlet enabling in the test app to be able to serve static resources from the webapp. --- .../data/rest/test/webmvc/RestExporterWebInitializer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/test/webmvc/RestExporterWebInitializer.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/test/webmvc/RestExporterWebInitializer.java index 9b3ee90c5..9120419c2 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/test/webmvc/RestExporterWebInitializer.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/test/webmvc/RestExporterWebInitializer.java @@ -9,6 +9,7 @@ import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.ContextLoaderListener; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; +import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; /** * @author Jon Brisbin @@ -28,6 +29,8 @@ public class RestExporterWebInitializer implements WebApplicationInitializer { ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", servlet); dispatcher.setLoadOnStartup(1); dispatcher.addMapping("/*"); + + new DefaultServletHandlerConfigurer(servletContext).enable(); } }