网站首页 SpringBoot正文

spring boot Exception parsing document: template="xxxxxxxx", line 17 - column 5的错误

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Mon Apr 02 14:03:18 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).

Exception parsing document: template="xxxxxxxxl", line 17 - column 5



生成的标签没有闭合  

Thymeleaf模板引擎,遇到不闭合标签会报这个错误,补全标签或者

解决方案:

1. 添加maven依赖

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

2. 更改application.Properties属性

spring.thymeleaf.mode=LEGACYHTML5


还没有人评论?赶快抢个沙发~

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。