报错情况
2020-04-05 10:08:56.194 ERROR 15260 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "success": Exception parsing document: template="success", line 6 - column 3
2020-04-05 10:08:56.197 ERROR 15260 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Exception parsing document: template="success", line 6 - column 3] with root cause
org.xml.sax.SAXParseException: 元素类型 "meta" 必须由匹配的结束标记 "</meta>" 终止。
解决办法
idea新建的html模板是这样的
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
新建的模板都报错????
应该是Thymeleaf模板引擎解析html太严格导致的吧。有点坑!!!!