spring boot使用thymeleaf版本问题
Spring boot默认使用的是thymeleaf的2版本,这个版本比较低,有些功能不支持,需要切换成3版本
thymeleaf在版本中的配置:
<properties>
<thymeleaf.version>3.0.11.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>
本文介绍了如何将Springboot项目中默认的Thymeleaf版本从2升级到3,以获取更多功能支持。关键步骤包括在项目的properties配置中指定Thymeleaf和thymeleaf-layout-dialect的版本,并更新相关依赖。
21万+

被折叠的 条评论
为什么被折叠?



