1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:mvc="http://www.springframework.org/schema/mvc"
5 xmlns:context="http://www.springframework.org/schema/context"
6 xmlns:util="http://www.springframework.org/schema/util"
8 http://www.springframework.org/schema/beans
9 http://www.springframework.org/schema/beans/spring-beans.xsd
10 http://www.springframework.org/schema/mvc
11 http://www.springframework.org/schema/mvc/spring-mvc.xsd
12 http://www.springframework.org/schema/context
13 http://www.springframework.org/schema/context/spring-context.xsd
14 http://www.springframework.org/schema/util
15 http://www.springframework.org/schema/util/spring-util.xsd
18 <!-- Resolve app-parameters through java-systemproperties -->
19 <context:property-placeholder location="classpath:maven-grunt-integration.properties" />
21 <!-- Needed, to map the servlet on /* -->
22 <mvc:default-servlet-handler/>
23 <mvc:view-controller path="/" view-name="index"/>
25 <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
26 <property name="mappings">
28 /thymeleaf/**=staticResources
29 /*.html=urlFilenameViewController
30 /**/*.html=urlFilenameViewController
33 <property name="order" value="10"/>
35 <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
36 <bean id="staticResources" class="org.springframework.web.servlet.resource.ResourceHttpRequestHandler">
37 <property name="locations">
39 <value>/thymeleaf/</value>
44 <!-- Thymeleaf Spring-View-Resolver -->
45 <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
46 <property name="templateEngine" ref="templateEngine" />
47 <property name="characterEncoding" value="UTF-8" />
48 <property name="contentType" value="text/html; charset=UTF-8" />
52 <!-- Thymeleaf Template-Resolver -->
53 <bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
54 <property name="prefix" value="/thymeleaf/" />
55 <property name="suffix" value=".html" />
56 <property name="templateMode" value="HTML5" />
57 <property name="characterEncoding" value="UTF-8" />
58 <property name="cacheable" value="${maven-grunt-integration.cacheable}" />
61 <!-- Thymeleaf Spring4-Template-Engine -->
62 <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
63 <property name="templateResolver" ref="templateResolver" />
64 <property name="additionalDialects">
66 <bean class="nz.net.ultraq.thymeleaf.LayoutDialect"/>