Thymeleaf
Thymeleaf
使用:
- 导入start依赖
<!--SpringBoot导入-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--非springboot导入-->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>2.1.4</version>
</dependency>
- html页面加入约束
- 之后可以使用Tamplate 放入html
Thymeleaf是一个模板引擎,可以替代jsp
语法:后续添加