首页 > 编程语言 > 详细

SpringBoot使用thymeleaf和layui时遇到的问题

时间:2020-03-03 13:29:53      阅读:285      评论:0      收藏:0      [点我收藏+]

在使用thymeleaf时报错
An error happened during template parsing (template: "class path resource [templates/mainPage/main.html]" - line 134, col 168)
我最后找了 很久发现报错的那一行有个HTML结束标签不对,改好之后页面就可以正常显示了。

每个人报的错误都可能不同,仔细看一下报错的内容和具体行数。




thymeleaf+layui加载页面渲染时TemplateProcessingException: Could not parse as expression: "
org.attoparser.ParseException: Could not parse as expression
也就是把cols后的[[ ]]变为

[

    [

    ]

]

因为[[…]]之间的表达式在thymeleaf被认为是内联表达式,所以渲染错误

SpringBoot使用thymeleaf和layui时遇到的问题

原文:https://www.cnblogs.com/lhd1998/p/12401483.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!