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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

EnjoyCoding.   2021-08-03 我要评论
想了解浅谈spring boot使用thymeleaf版本的问题的相关内容吗,EnjoyCoding.在本文为您仔细讲解springboot thymeleaf版本的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:spring,boot使用,thymeleaf版本,下面大家一起来学习吧。

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>

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们