当前位置:主页 > 软件编程 > JAVA代码 >

浅谈spring boot使用thymeleaf版本的问题

时间:2022-02-10 13:50:14 | 栏目:JAVA代码 | 点击:

spring boot使用thymeleaf版本问题

Spring boot默认使用的是thymeleaf的2版本,这个版本比较低,有些功能不支持,需要切换成3版本

在properties中加入

<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>

thymeleaf在Maven的版本配置

<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>

您可能感兴趣的文章:

相关文章