Interacting with a Thymeleaf template

Having put Thymeleaf on the classpath, an entire reactive view resolver has already been configured for us. The last step in putting together the web layer for our social media platform is to create the Thymeleaf template itself. We can do that by putting the following content into index.html underneath /src/main/resources/templates:

 <!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8" /> <title>Learning Spring Boot: Spring-a-Gram</title> <link rel="stylesheet" href="/main.css" /> </head> <body> <h1>Learning Spring Boot - 2nd Edition</h1> <div> <table> <thead> <tr> <th>Id</th><th>Name</th><th>Image</th><th></th> </tr> </thead> <tbody> <tr th:each="image : ${images}"> ...

Get Developing Java Applications with Spring and Spring Boot now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.