在使用layui模板进行表格渲染时,如图所示,在cols中有两个“[[”(中括号)并列,导致在跳转到此页面时报以下错误
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/system/menulist.html]")] with root cause
org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "
{type:'numbers'}
,{type:'checkbox',sort:true}
,{field:'name', width:300, title: '菜单名称',edit:'text',sort:true}
,{field:'url', width:300, title: 'url',edit:'text'}
,{field:'id',width:100, title: 'id',sort:true}
,{field:'pid', title: 'pid',sort:true}
,{width:100,title: '操作', align:'center'/*toolbar: '#barDemo'*/
,templet: function(d){
var html='';
var addBtn='<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="add">添加</a>';
var delBtn='<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>';
return addBtn+delBtn;
}
}
" (template: "system/menulist" - line 96, col 22)

image

image
网友评论