spring boot使用thymeleaf版本問題
Spring boot默認使用的是thymeleaf的2版本,這個版本比較低,有些功能不支持,需要切換成3版本
在properties中加入
1
2
|
< thymeleaf.version >3.0.9.RELEASE</ thymeleaf.version > < thymeleaf-layout-dialect.version >2.1.1</ thymeleaf-layout-dialect.version > |
thymeleaf在Maven的版本配置
1
2
3
4
|
< properties > < thymeleaf.version >3.0.11.RELEASE</ thymeleaf.version > < thymeleaf-layout-dialect.version >2.1.1</ thymeleaf-layout-dialect.version > </ properties > |
1
2
3
4
|
< dependency > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-starter-thymeleaf</ artifactId > </ dependency > |
以上為個人經驗,希望能給大家一個參考,也希望大家多多支持服務器之家。
原文鏈接:https://blog.csdn.net/qq_37570296/article/details/81559434