【发布时间】:2020-01-05 20:39:29
【问题描述】:
我有以下 Thymeleaf 代码,如果 taxHistory.landValue 等于 0 则打印“--”,如果 taxHistory.landValue 大于 0 则打印实际值
<td th:if"${taxHistory.landValue==0}" th:text="--"></td>
<td th:unless="${taxHistory.landValue>0}" th:text="|${taxHistory.landValue}|"></td>
但是我收到以下错误
org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "0}"
在 Thymeleaf 中这样做的正确方法是什么?
【问题讨论】:
标签: thymeleaf