74.9 using Thymeleaf 3
By default, Spring-boot-starter-thymeleaf uses Thymeleaf 2.1. If you are using Spring-boot-starter-parent, you can use Thymeleaf 3 by overriding the Thymeleaf.version and Thymeleaf-layout-dialect.version properties, for example:
<properties>
<thymeleaf.version> 3.0.2.RELEASE </thymeleaf.version>
< thymeleaf-layout-dialect.version>
2.1.1 </thymeleaf-layout-dialect.version> </properties>
|
If you are managing dependencies yourself, check out the spring-boot-dependencies list of artifacts related to these two versions. |
In order to avoid the deprecated HTML 5 template pattern and the HTML template pattern warning information is used instead, you may also need to explicitly configure Spring.thymeleaf.mode for HTML, for example:
Spring.thymeleaf.mode:HTML
See the Thymeleaf 3 sample to see this action.
If you are using any other auto-configured Thymeleaf Extras (Spring Security, data properties, or Java 8 time), you should also overwrite each version with a version that is compatible with Thymeleaf 3.0.