springboot中使用thymeleaf模板的步骤。
(1) 使用thymeleaf模板
步骤一:添加thymeleaf依赖。
依赖代码:
<!-- thymeleaf依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
步骤二:关闭thymeleaf模板缓存
在application.properties配置文件中,添加关闭thymeleaf缓存的配置。
配置代码:
##