在学习springboot引入thymeleaf的时候,遇到了一个问题,示例中spring-boot-starter-parent的版本是1.5.10.RELEASE,而本人在练习的时候建里一个springboot的项目,spring-boot-starter-parent的版本是2.1.1.RELEASE。引入thymeleaf的方法是在pom.xml文件中引入:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<!-- 布局功能的支持程序 thymeleaf3主程序 layout2以上版本 -->
<!-- thymeleaf2 layout1-->
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
</properties>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</