Spring-Konfigurationsdateien liegen jetzt standardgemäß unter src/resources
authorKai Moritz <km@feder-software.de>
Wed, 26 Feb 2014 09:17:38 +0000 (10:17 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 19 Jan 2016 16:45:42 +0000 (17:45 +0100)
src/main/resources/spring/mvc.xml [new file with mode: 0644]
src/main/resources/spring/tiles.xml [new file with mode: 0644]
src/main/webapp/WEB-INF/spring/mvc.xml [deleted file]
src/main/webapp/WEB-INF/spring/tiles.xml [deleted file]
src/main/webapp/WEB-INF/web.xml

diff --git a/src/main/resources/spring/mvc.xml b/src/main/resources/spring/mvc.xml
new file mode 100644 (file)
index 0000000..a18d739
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+           http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+           http://www.springframework.org/schema/mvc
+           http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
+           http://www.springframework.org/schema/context
+           http://www.springframework.org/schema/context/spring-context-3.1.xsd
+           ">
+
+  <!-- Damit das DispatcherServlet auf /* gemappt werden kann -->
+  <mvc:default-servlet-handler/>
+  <mvc:view-controller path="/" view-name="index"/>
+
+  <!-- Scann classpath for classes anntated as components -->
+  <context:component-scan base-package="de.juplo.branding"/>
+
+  <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
+    <property name="mappings">
+      <value>
+        /*.html=urlFilenameViewController
+        /**/*.html=urlFilenameViewController
+      </value>
+    </property>
+    <property name="order" value="10"/>
+  </bean>
+  <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
+
+  <!-- Tiles View-Resolver -->
+  <bean class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"/>
+
+  <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
+  <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
+    <property name="prefix" value="/WEB-INF/views/"/>
+    <property name="suffix" value=".jsp"/>
+  </bean>
+
+  <bean class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
+    <property name="definitions">
+      <list>
+        <value>classpath:/spring/tiles.xml</value>
+      </list>
+    </property>
+    <property name="useMutableTilesContainer" value="true"/>
+  </bean>
+
+</beans>
diff --git a/src/main/resources/spring/tiles.xml b/src/main/resources/spring/tiles.xml
new file mode 100644 (file)
index 0000000..5cda94a
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+<tiles-definitions>
+
+  <definition name="BASEPAGE" template="/WEB-INF/templates/html5page.jsp">
+    <put-attribute name="title" value="TITLE IS MISSING" type="string"/>
+    <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
+    <put-attribute name="header" value="/WEB-INF/templates/header.jsp" type="template"/>
+    <put-attribute name="breadcrumb" value="BREADCRUMB IS MISSING" type="string"/>
+    <put-attribute name="maincontent" value="/WEB-INF/templates/maincontent.jsp" type="template"/>
+    <put-attribute name="contentclass" value="menu" type="string"/>
+    <put-attribute name="marginalcontent" value="/WEB-INF/templates/marginalcontent.jsp" type="template"/>
+    <put-attribute name="navigation" value="/WEB-INF/templates/navigation.jsp" type="template"/>
+    <put-attribute name="footer" value="/WEB-INF/templates/footer.jsp" type="template"/>
+  </definition>
+
+  <definition name="NOMENU" extends="BASEPAGE">
+    <put-attribute name="contentclass" value="nomenu" type="string"/>
+  </definition>
+
+  <definition name="test" extends="BASEPAGE">
+    <put-attribute name="breadcrumb" value="/WEB-INF/templates/test/breadcrumb.jsp" type="template"/>
+    <put-attribute name="navigation" value="/WEB-INF/templates/test/navigation.jsp" type="template"/>
+    <put-attribute name="maincontent" value="/WEB-INF/templates/test/experimente.jsp" type="template"/>
+  </definition>
+
+  <definition name="TESTLAB" template="/WEB-INF/templates/testlab.jsp">
+    <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
+    <put-attribute name="title" value="TEST-TITLE IS MISSING" type="string"/>
+    <put-attribute name="content" value="&lt;div class='testlab'&gt;TEST-CONTENT IS MISSING&lt;div&gt;" type="string"/>
+  </definition>
+
+</tiles-definitions>
diff --git a/src/main/webapp/WEB-INF/spring/mvc.xml b/src/main/webapp/WEB-INF/spring/mvc.xml
deleted file mode 100644 (file)
index 5fb88cf..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:mvc="http://www.springframework.org/schema/mvc"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="
-           http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
-           http://www.springframework.org/schema/mvc
-           http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-3.1.xsd
-           ">
-
-  <!-- Damit das DispatcherServlet auf /* gemappt werden kann -->
-  <mvc:default-servlet-handler/>
-  <mvc:view-controller path="/" view-name="index"/>
-
-  <!-- Scann classpath for classes anntated as components -->
-  <context:component-scan base-package="de.juplo.branding"/>
-
-  <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
-    <property name="mappings">
-      <value>
-        /*.html=urlFilenameViewController
-        /**/*.html=urlFilenameViewController
-      </value>
-    </property>
-    <property name="order" value="10"/>
-  </bean>
-  <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
-
-  <!-- Tiles View-Resolver -->
-  <bean class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"/>
-
-  <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory -->
-  <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
-    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
-    <property name="prefix" value="/WEB-INF/views/"/>
-    <property name="suffix" value=".jsp"/>
-  </bean>
-
-  <bean class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
-    <property name="definitions">
-      <list>
-        <value>/WEB-INF/spring/tiles.xml</value>
-      </list>
-    </property>
-    <property name="useMutableTilesContainer" value="true"/>
-  </bean>
-
-</beans>
diff --git a/src/main/webapp/WEB-INF/spring/tiles.xml b/src/main/webapp/WEB-INF/spring/tiles.xml
deleted file mode 100644 (file)
index 5cda94a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE tiles-definitions PUBLIC
-       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
-       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
-<tiles-definitions>
-
-  <definition name="BASEPAGE" template="/WEB-INF/templates/html5page.jsp">
-    <put-attribute name="title" value="TITLE IS MISSING" type="string"/>
-    <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
-    <put-attribute name="header" value="/WEB-INF/templates/header.jsp" type="template"/>
-    <put-attribute name="breadcrumb" value="BREADCRUMB IS MISSING" type="string"/>
-    <put-attribute name="maincontent" value="/WEB-INF/templates/maincontent.jsp" type="template"/>
-    <put-attribute name="contentclass" value="menu" type="string"/>
-    <put-attribute name="marginalcontent" value="/WEB-INF/templates/marginalcontent.jsp" type="template"/>
-    <put-attribute name="navigation" value="/WEB-INF/templates/navigation.jsp" type="template"/>
-    <put-attribute name="footer" value="/WEB-INF/templates/footer.jsp" type="template"/>
-  </definition>
-
-  <definition name="NOMENU" extends="BASEPAGE">
-    <put-attribute name="contentclass" value="nomenu" type="string"/>
-  </definition>
-
-  <definition name="test" extends="BASEPAGE">
-    <put-attribute name="breadcrumb" value="/WEB-INF/templates/test/breadcrumb.jsp" type="template"/>
-    <put-attribute name="navigation" value="/WEB-INF/templates/test/navigation.jsp" type="template"/>
-    <put-attribute name="maincontent" value="/WEB-INF/templates/test/experimente.jsp" type="template"/>
-  </definition>
-
-  <definition name="TESTLAB" template="/WEB-INF/templates/testlab.jsp">
-    <put-attribute name="htmlhead" value="/WEB-INF/templates/html-head.jsp" type="template"/>
-    <put-attribute name="title" value="TEST-TITLE IS MISSING" type="string"/>
-    <put-attribute name="content" value="&lt;div class='testlab'&gt;TEST-CONTENT IS MISSING&lt;div&gt;" type="string"/>
-  </definition>
-
-</tiles-definitions>
index 6eb68da..320365f 100644 (file)
@@ -11,7 +11,7 @@
   <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
-      /WEB-INF/spring/mvc.xml
+      classpath:/spring/mvc.xml
     </param-value>
   </context-param>