spring boot 集成thymeleaf
1.pom加入thymeleaf依赖
<!-- 使用thymeleaf作为试图渲染器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
注意:spring boot 默认使用的是老版本的thymeleaf,不支持双标签会报 meta必须以 表填结尾的类似错误
解决办法:在pom文件设置thymeleaf的版本号设置
<!-- set thymeleaf version -->
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>