SpringBoot 2.0 thymeleaf layout 模板失效

参考链接:https://blog.csdn.net/oarsman/article/details/79605458


问题描述


springboot 从1.4升级到2.0,thymeleaf 页面乱掉了

正常页面:

SpringBoot 2.0 thymeleaf layout 模板失效_第1张图片

异常页面

SpringBoot 2.0 thymeleaf layout 模板失效_第2张图片



解决方案


在2.0项目的jar包中,没有thymeleaf-layout-dialect这个jar包,在pom文件中引入即可

SpringBoot 2.0 thymeleaf layout 模板失效_第3张图片


你可能感兴趣的:(异常记录)