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>
以上为个人经验,希望能给大家一个参考,也希望大家多多支持www.887551.com。
黄山市民网:https://www.huangshanshimin.com/