一、模板引擎
- 类型
JSP、Velocity、Freemarker、Thymeleaf - 实现思想
二、Thymeleaf 高级语言模板引擎
(1)引入Thymeleaf
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<properties>
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
//布局功能支持的程序 thymeleaf3主程序 layout2以上版本
<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
</properties>
(2)Thymeleaf 使用&语法
@ConfigurationProperties(
prefix = "spring.thymeleaf"
)
public class Thy