SpringBoot thymeleaf template version
thymeleaf template replacement version
Modify thymeleaf template version
================================
©Copyright Sweet Potato Yao March 23, 2018
http://fanshuyao.iteye.com/
1. SpringBoot uses the thymeleaf template to reference the dependent Jar package:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
2. The default version of thymeleaf in SpringBoot is: 1.5.10.RELEAS
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> <version>1.5.10.RELEASE</version> </dependency>
3. Modify the version of the thymeleaf template
Add the following configuration to the properties tag:
<properties> <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version> <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version> </properties>
An example is as follows:
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version> <thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version> </properties>
Note: thymeleaf version 3 has been rewritten, thymeleaf-layout-dialect must be version 2 or higher
================================
©Copyright Sweet Potato Yao March 23, 2018
http://fanshuyao.iteye.com/