From 97e189086746b5f200d9d735dedbd1df1cc6b879 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 7 Feb 2013 10:01:53 +0800 Subject: [PATCH] web config enhancements - web.xml is now simpler - mvc config file has been split into 2 files --- .springBeans | 14 ++++ src/main/webapp/WEB-INF/mvc-core-config.xml | 58 ++++++++++++++ ...clinic-servlet.xml => mvc-view-config.xml} | 52 +------------ src/main/webapp/WEB-INF/web.xml | 78 +++---------------- 4 files changed, 87 insertions(+), 115 deletions(-) create mode 100644 .springBeans create mode 100644 src/main/webapp/WEB-INF/mvc-core-config.xml rename src/main/webapp/WEB-INF/{petclinic-servlet.xml => mvc-view-config.xml} (63%) diff --git a/.springBeans b/.springBeans new file mode 100644 index 000000000..2bef41856 --- /dev/null +++ b/.springBeans @@ -0,0 +1,14 @@ + + + 1 + + + + + + + src/main/webapp/WEB-INF/mvc-core-config.xml + + + + diff --git a/src/main/webapp/WEB-INF/mvc-core-config.xml b/src/main/webapp/WEB-INF/mvc-core-config.xml new file mode 100644 index 000000000..6ce11a4a6 --- /dev/null +++ b/src/main/webapp/WEB-INF/mvc-core-config.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/petclinic-servlet.xml b/src/main/webapp/WEB-INF/mvc-view-config.xml similarity index 63% rename from src/main/webapp/WEB-INF/petclinic-servlet.xml rename to src/main/webapp/WEB-INF/mvc-view-config.xml index 485b73d7e..a4e089e7b 100644 --- a/src/main/webapp/WEB-INF/petclinic-servlet.xml +++ b/src/main/webapp/WEB-INF/mvc-view-config.xml @@ -10,34 +10,8 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index e1ea9935e..7162fdc46 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,39 +1,22 @@ - + Spring PetClinic - Spring PetClinic sample application - - - - webAppRootKey - petclinic.root - spring.profiles.active jdbc - - - - log4jConfigLocation - /WEB-INF/classes/log4j.xml - - org.springframework.web.context.ContextLoaderListener - - - - petclinic org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/mvc-core-config.xml + 1 - petclinic / + httpMethodFilter org.springframework.web.filter.HiddenHttpMethodFilter @@ -110,9 +60,5 @@ httpMethodFilter petclinic - - - 10 - \ No newline at end of file