Added first Thymeleaf template to application (intro.html)
Also modified template resolver configuration to remove ".html" suffix so that it is specified in Tiles definition names and therefore is easy to differentiate in case when the HTML has the same name as a definition (thus avoiding infinite recursion).
This commit is contained in:
committed by
Rossen Stoyanchev
parent
d24f40ddf3
commit
0e1a2453e0
@@ -51,7 +51,6 @@
|
||||
<bean id="templateResolver"
|
||||
class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
|
||||
<property name="prefix" value="/WEB-INF/" />
|
||||
<property name="suffix" value=".html" />
|
||||
<property name="templateMode" value="HTML5" />
|
||||
</bean>
|
||||
|
||||
|
||||
29
booking-mvc/src/main/webapp/WEB-INF/intro.html
Normal file
29
booking-mvc/src/main/webapp/WEB-INF/intro.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div xmlns:th="http://www.thymeleaf.org">
|
||||
<h1>Welcome to Spring Travel</h1>
|
||||
<p>
|
||||
This sample demonstrates how to use Spring MVC and Spring Web Flow together with JavaServerPages (JSP) and Tiles.
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
The key features illustrated in this sample include:
|
||||
</p>
|
||||
<ul>
|
||||
<li>A declarative navigation model enabling full browser button support and dynamic navigation rules</li>
|
||||
<li>A fine-grained state management model, including support for ConversationScope and ViewScope</li>
|
||||
<li>Modularization of web application functionality by domain use case, illustrating project structure best-practices</li>
|
||||
<li>Spring Expression Language (SpEL) integration</li>
|
||||
<li>Spring 3 formatting annotations @DateTimeFormat, @NumberFormat</li>
|
||||
<li>Spring MVC custom namespace</li>
|
||||
<li>Spring Security integration</li>
|
||||
<li>Annotated POJO @Controllers for implementing RESTful user interactions.</li>
|
||||
<li>Declarative page authoring with JSP, JSTL, and Spring MVC's form tag library</li>
|
||||
<li>Page layout and composition with Apache Tiles</li>
|
||||
<li>A JavaScript API for decorating HTML elements with behaviors such as Ajax, validation, and effects.</li>
|
||||
<li>A grid layout with Blueprint CSS</li>
|
||||
<li>Exception handling support across all layers of the application</li>
|
||||
<li>SpringSource Tool Suite integration, with support for graphical flow modeling and visualization</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="hotels/search.html" th:href="@{/hotels/search}">Start your Spring Travel experience</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -6,7 +6,7 @@
|
||||
<tiles-definitions>
|
||||
|
||||
<definition name="intro" extends="standardLayout" templateType="jsp">
|
||||
<put-attribute name="body" value="/WEB-INF/intro.jsp" type="jsp"/>
|
||||
<put-attribute name="body" value="intro.html"/>
|
||||
</definition>
|
||||
|
||||
<definition name="login" extends="standardLayout" templateType="jsp">
|
||||
|
||||
Reference in New Issue
Block a user