一、Thmeleaf语法的使用
html格式的页面放在classpath:/templates/就会自动渲染。
1.在pom.xml导入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2.导入thymeleaf的名称空间
<html lang="en" xmlns:th="http://www.thymeleaf.org">
3.在classpath:/templates中创建html代码。
![](https://img2018.cnblogs.com/blog/1593465/201902/1593465-20190221160237217-1158769572.png)