From 8b7340c6cc3f113c5d47da320345c182354950dc Mon Sep 17 00:00:00 2001 From: Jon Brisbin Date: Thu, 7 Mar 2013 10:32:21 -0600 Subject: [PATCH] #71 Added a default no-arg constructor to the helper servlet. --- .../RepositoryRestDispatcherServlet.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestDispatcherServlet.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestDispatcherServlet.java index 828fc7788..e10472090 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestDispatcherServlet.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestDispatcherServlet.java @@ -11,9 +11,22 @@ import org.springframework.web.servlet.DispatcherServlet; * @author Jon Brisbin */ public class RepositoryRestDispatcherServlet extends DispatcherServlet { - public RepositoryRestDispatcherServlet(WebApplicationContext webApplicationContext) { - super(webApplicationContext); - setContextClass(AnnotationConfigWebApplicationContext.class); - setContextConfigLocation(RepositoryRestMvcConfiguration.class.getName()); - } + + + private static final long serialVersionUID = 5761346441984290240L; + + public RepositoryRestDispatcherServlet() { + configure(); + } + + public RepositoryRestDispatcherServlet(WebApplicationContext webApplicationContext) { + super(webApplicationContext); + configure(); + } + + private void configure() { + setContextClass(AnnotationConfigWebApplicationContext.class); + setContextConfigLocation(RepositoryRestMvcConfiguration.class.getName()); + } + }