Spring Boot: Spring Boot 1.4.x & Thymeleaf 3.x configuration

Thymeleaf is quite popular template engine widely used among Spring Boot developers. And we use it as well. While working with Spring Boot 1.4.x you will find that spring-boot-starter-thymeleaf is based on older Thymeleaf 2.x version, while there is Thymeleaf 3.x available for some time.

But wait, there is an easy way how to get latest Thymeleaf for my Spring Boot 1.4.x application. There are 3 simple steps to do so.

  1. Reference Thymeleaf in build.gradle file
    (assuming we have Gradle based Spring Boot project)

2. Specify Thymeleaf version in build.gradle file
Here is the place to say that we want version 3.x of Thymeleaf library

3. (Optional) Create @Configuration class with Thymeleaf configuration options. Spring Boot with detect this and create appropriate beans.

long time … husband, father, Christ follower, developer

long time … husband, father, Christ follower, developer