springboot2 整合 thymeleaf 比较简单,可按照以下步骤。
- pom.xml 中添加 web 和 thymeleaf 依赖。application.yml 可不修改,使用默认配置。
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>