Paket umbenannt und überarbeitet (Feinschliff)
[website] / src / main / resources / spring / mvc.xml
index e2cdc38..04c5637 100644 (file)
@@ -3,6 +3,7 @@
        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"
+       xmlns:util="http://www.springframework.org/schema/util"
        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/spring-mvc-3.1.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.1.xsd
+           http://www.springframework.org/schema/util
+           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">
@@ -41,6 +47,8 @@
   <!-- Thymeleaf Spring-View-Resolver -->
   <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
     <property name="templateEngine" ref="templateEngine" />
+    <property name="characterEncoding" value="UTF-8" />
+    <property name="contentType" value="text/html; charset=UTF-8" />
   </bean>
 
 
     <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 -->
   <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
     <property name="templateResolver" ref="templateResolver" />
+    <property name="additionalDialects">
+      <util:set>
+        <bean class="nz.net.ultraq.thymeleaf.LayoutDialect"/>
+        <bean class="org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect"/>
+      </util:set>
+    </property>
   </bean>
 
 </beans>