当前位置:   article > 正文

错误:.TemplateProcessingException: Exception evaluating SpringEL expression:_exception processing template "error": exception e

exception processing template "error": exception evaluating springel express

错误org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: “class path resource [templates/login/main.html]”)
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: “sub.url” (template: “login/main” - line 38, col 32)
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: “sub.url” (template: “login/main” - line 38, col 32)
2021-04-17 08:24:17.012 ERROR 4572 — [nio-8080-exec-2] 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: An error happened during template parsing (template: “class path resource [templates/login/main.html]”)] with root cause

HTML代码:

<dl class="layui-nav-child" th:if="${resource.subs} ne null " th:each="sub:${resource.subs}">
                        <dd><a th:href="'javascript:showTab(\''+${sub.url}+'\',\'' +${sub.resourceName}+'\',' + ${sub.resourceId} +');'" th:text="${sub.resourceName}">列表一</a></dd>

                    </dl>

<script th:src="@{/webjars/layui/layui.all.js}"></script>
<script th:src="@{/webjars/jquery/jquery.js}"></script>
<script th:src="@{/static/js/login/main.js}"></script>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

js

function showTab(url,name,id){
    let length = $("li[lay-id="+id+"]").length;
    let element = layui.element;

    if (length == 0) {
        let fullUrl = "/" + url;
        let height = $(window).height() - 185;
        let content = '<iframe style="width: 100%;height: '+height+'px" src="' +fullUrl+'" frameborder="0" scrolling="no">'
        element.tabAdd('menu', {
            title: name,
            content: content,
            id: id
        });
    }
    element.tabChange("menu", id);
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

后台是没有URL的实体属性的。。。。。
解决:尚未解决
更新:需要在后台加入URL的实体属性。。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/45452
推荐阅读
相关标签
  

闽ICP备14008679号