O'Reilly logo

Learning Spring Boot 2.0 - Second Edition by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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}"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required