版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jinziweiwang/article/details/85524800
最近自己搭建了一个SpringBoot项目,启动后报出如下错误:
从报错信息可以看到是thymeleaf 模板除了问题,不能解析xml,检查pom文件配置如下:
<properties>
<java.version>1.8</java.version>
<!-- <thymeleaf.version>3.0.0.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.0.0</thymeleaf-layout-dialect.version> --></properties>
原来是吧thymeleaf模板引擎去掉了,将次放开就OK了
模板引擎是SpringMV返回model必须依赖的,常用的模板引擎还有swagger、freeMaker。都支持解析html片段,字符串,文本格式。