Resolving Thymeleaf views

Thymeleaf is a Java-based XML/HTML/HTML5 template engine library to build web applications. It allows faster processing of templates and increased performance due to the intelligent caching of parsed view files. Please refer to the official Thymeleaf documentation for Thymeleaf page authoring.

You need Thymeleaf and Spring (org.thymeleaf) in your Maven dependencies in order to use Thymeleaf in your projects. Thymeleaf views can be resolved in your project with the following snippet:

<beans:bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver"> <beans:property name="templateEngine" ref="templateEngine" /> <beans:property name="order" value="1" /> <beans:property name="viewNames" value="*.html,*.xhtml" /> </beans:bean> ...

Get Spring MVC: Designing Real-World Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.