日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

Exception evaluating SpringEL expression異常處理

作者:愛紙 更新時間: 2022-08-19 編程語言

在運行項目時,控制臺拋出異常Exception evaluating SpringEL expression,很明顯這個異常時指向前端的

<tr>
            <td>1</td>
            <td th:text="${cloth.getCname()}"></td>
            <td th:text="${cloth.getEbrand()}"></td>
            <td th:text="${cloth.getCgender()}"></td>
            <td th:text="${detail.getDcolor()}"></td>
            <td th:text="${detail.getDprice()}"></td>
            <td th:text="${detail.getDsize()}"></td>
        </tr>

可以看出,使用thymeleaf的語法并沒有問題,所以我們考慮是該cloth對象除了問題,我們回到后端,查看sql語句

發現查詢并沒有查出數據,在controller將cloth對象輸出,也顯示為null?

?總結可以的處該異常的原因就是因為EL表達式中的cloth對象為空造成的

?

原文鏈接:https://blog.csdn.net/m0_71890428/article/details/126291069

欄目分類
最近更新