Website-Inhalt und -Styling in ein Frontend-Projekt ausgelagert
[website] / src / main / resources / spring / mvc.xml
index 87c2a01..bd79207 100644 (file)
@@ -15,6 +15,9 @@
            http://www.springframework.org/schema/util/spring-util-4.0.xsd
            ">
 
+  <!-- Anwendungs-Parameter über Java-Systemproperties auflösen -->
+  <context:property-placeholder location="classpath:branding.properties" />
+
   <!-- Damit das DispatcherServlet auf /* gemappt werden kann -->
   <mvc:default-servlet-handler/>
   <mvc:view-controller path="/" view-name="index"/>
   <!-- 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="${branding.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>