Thymeleaf Crash Course

Kamer Elciyar
8 min readFeb 23, 2020

If you are not a Medium Member you can read it here.

Hello! In this article I will explain what template engine is and give you a crash course about Thymeleaf with Spring Boot. My main resources are official documentations which are published under the title of Thymeleaf 3.0 and Thymeleaf+Spring. Github repo is also available at the end of the article.

1.Theoretical
1.1 What is Thymeleaf?
1.2 Thymeleaf Standart Dialect
2. Practical
2.1 Folder Hierarchy
2.2 Syntax
2.2.1 Simple Expressions
2.2.2 Constructing Texts
2.2.3 Arithmetic Operations, Comparators and Equality
2.2.4 th:if, th:unless, th:switch, th:case
2.2.5 Loops with th:each
2.2.6 Ternary and Elvis Operator
2.2.7 th:* Attributes
2.2.8 General Attribute Modification
2.2.9 Local Variables
2.2.10 Thymeleaf Comment Blocks
2.2.11 Expression Inlining
2.3 Expression Objects
2.3.1 Expression Basic Objects
2.3.2 Expression Utility Objects
3. A Few Words

1. Theoretical

1.1 What is Thymeleaf?

You can find the shortest and -I think- the best explanation at Thymeleaf’s docs:

Thymeleaf is a modern server-side Java template engine for…

Keywords are server-side and Java template engine. Rest of the definition is not important at this point. Let’s look at template engine.

--

--