`

springboot2.x 整合 thymeleaf

 
阅读更多

原来使用springboot 1.x 整合 thymeleaf 时,使用到了 thymeleaf的 layout:decorator,可以正常使用。

但是当使用springboot 2.x 时,发现 layout:decorator失效,花费了一些时间才知需要引入另一个依赖,如下:

<dependency>
		    <groupId>com.github.zhanhb</groupId>
		    <artifactId>thymeleaf-layout-dialect</artifactId>
		    <version>2.3.0</version>
		</dependency>

 

引入后解决问题。

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics