https://github.com/thymeleaf/thymeleafhttps://github.com/thymeleaf/thymeleaf
另一种模板引擎FreeMarker
1.引入依赖
springboot直接引入:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2、在HTML文件导入约束
<html lang="en" xmlns:th="http://www.thymeleaf.org">
3、使用格式
4、取值在标签中 th:text=${}
取值方法:
转义和不转义取值
遍历取值数组