Thymeleaf模板
第一步引入thymeleaf,在pom中插入
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.0.11.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
<version>3.0.4.RELEASE</version>
<scope>compile</scope>
</dependency>
注意thymeleaf只能存在于templates
中,并且格式是html
(ctrl+n
搜索thymeleaf,查看其properties文件即可)