困惑了一个小时的问题:

spring boot默认thymeleaf版本是2.1.1
<properties>
    <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
    <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
</properties>

 <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
 </dependency>
spring-boot-starter-thymeleaf版本问题,经过查阅修改为:3.0.11.RELEASE就OK啦!
<properties>
    <thymeleaf.version>3.0.11.RELEASE</thymeleaf.version>
    <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
</properties>

最终截图:

spring-boot-starter-thymeleaf版本问题-LMLPHP

03-28 04:42