thymeleaf报错元素类型必须由匹配的结束标记终止

spring boot 1.x 版本中thymeleaf报错元素类型 “link” 必须由匹配的结束标记 “</link>” 终止解决办法:

    1.在pom.xml文件中添加:

<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
</dependency>


2.在配置文件中设置:
spring.thymeleaf.mode=LEGACYHTML5
posted @ 2019-07-03 09:29  JillWen  阅读(3418)  评论(0编辑  收藏  举报