2023-10-25T15:24:29.817+08:00 ERROR 6288 --- [nio-8000-exec-1] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8000-exec-1] Exception processing template "blog/articleList": An error happened during template parsing (template: "class path resource [templates/blog/articleList.html]")
2023-10-25T15:24:29.821+08:00 ERROR 6288 --- [nio-8000-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/blog] threw exception [Request processing failed: org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/blog/articleList.html]")] with root cause
今天学springboot跟着做demo的时候,因为在使用thymeleaf书写html页面时出现了语法错误,导致了以上错误,然后看一下错误提示,复制粘贴丢到了gpt之后发现错误。
<tr th:each="article, loopStatus : ${articleList}">
<td></td>
<td th:text="${loopStats.index+1}"></td>
<td th:text="${article.title}"></td>
<td th:text="${article.summary}"></td>
<td th:text="${article.readCount}"></td>
<td th:text="${article.createTime}"></td>
<td th:text="${article.updateTime}"></td>
</tr>
loopStats拼写错误了!!!论复制粘贴的重要性
修改一下就好了