Thymeleaf is a template engine that lets a Spring controller send data to an HTML view for display. Add the Spring Boot Thymeleaf starter, then use a template such as home.html to show values that can vary between requests. section 8.1
A dynamic greeting
A controller adds username and color attributes to a Model and returns home.html. The template uses ${username} for the greeting and ${color} to set its style, so the page can display values supplied by the controller. section 8.1
Listing 8.2 The home.html file representing the dynamic view of the app
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"> #A
<head>
<meta charset="UTF-8">
<title>Home Page</title>
</head>
<body>
<h1>Welcome
<span th:style="'color:' + ${color}" #B
th:text="${username}"></span>!</h1> #B
</body>
</html>See the HTML template using Thymeleaf attributes to display the controller’s values. section 8.1

