Paket umbenannt und überarbeitet (Feinschliff)
[website] / src / main / resources / spring / mvc.xml
index 87c2a01..04c5637 100644 (file)
            http://www.springframework.org/schema/util/spring-util-4.0.xsd
            ">
 
-  <!-- Damit das DispatcherServlet auf /* gemappt werden kann -->
+  <!-- Resolve application-parameters through java-systemproperties -->
+  <context:property-placeholder location="classpath:website.properties" />
+
+  <!-- Necesarry, to map the DispatcherServlet on /* -->
   <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"/>
+  <context:component-scan base-package="de.juplo.website"/>
 
   <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
     <property name="mappings">
   <!-- Thymeleaf Spring-View-Resolver -->
   <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
     <property name="templateEngine" ref="templateEngine" />
-    <property name="viewNames" value="views/*,templates/*"/>
-    <property name="order" value="1"/>
-  </bean>
-
-  <!-- Thymeleaf Tiles-View-Resolver -->
-  <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
-    <property name="templateEngine" ref="templateEngine" />
-    <property name="viewClass" value="org.thymeleaf.extras.tiles2.spring4.web.view.ThymeleafTilesView"/>
-    <property name="order" value="2"/>
-  </bean>
-
-
-  <!-- Thymeleaf Tiles-Configurer -->
-  <bean class="org.thymeleaf.extras.tiles2.spring4.web.configurer.ThymeleafTilesConfigurer">
-    <property name="definitions">
-      <list>
-        <value>classpath:/spring/tiles.xml</value>
-      </list>
-    </property>
-    <property name="useMutableTilesContainer" value="true"/>
+    <property name="characterEncoding" value="UTF-8" />
+    <property name="contentType" value="text/html; charset=UTF-8" />
   </bean>
 
 
@@ -72,7 +57,8 @@
     <property name="prefix" value="/thymeleaf/" />
     <property name="suffix" value=".html" />
     <property name="templateMode" value="HTML5" />
-    <property name="cacheable" value="false" /><!-- Only for development -->
+    <property name="characterEncoding" value="UTF-8" />
+    <property name="cacheable" value="${website.cacheable}" />
   </bean>
 
   <!-- Thymeleaf Spring4-Template-Engine -->
@@ -80,7 +66,8 @@
     <property name="templateResolver" ref="templateResolver" />
     <property name="additionalDialects">
       <util:set>
-        <bean class="org.thymeleaf.extras.tiles2.dialect.TilesDialect"/>
+        <bean class="nz.net.ultraq.thymeleaf.LayoutDialect"/>
+        <bean class="org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect"/>
       </util:set>
     </property>
   </bean>