HTML引入Thymeleaf
<html xmlns:th="http://www.thymeleaf.org">
JavaWeb引入Thymeleaf
一般在WEB-INF\lib中放入thymeleaf的jar包
Spring引入Thymeleaf
maven项目里的pom.xml里引入对应的依赖
<!-- Spring5和Thymeleaf整合包 -->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.0.12.RELEASE</version>
</dependency>
SpringBoot引入Thymeleaf
maven项目里的pom.xml里引入对应的依赖
<!--thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>