我在 Thymeleaf
中编写了一段代码:
<th:block th:if="${i.mid} > ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-arrow-up"></i>
</th:block>
<th:block th:if="${i.mid} == ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-resize-small"></i>
</th:block>
<th:block th:if="${i.mid} < ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-arrow-down"></i>
</th:block>
在这种情况下,我收到如下错误:
org.xml.sax.SAXParseException: The value of attribute "th:if" associated with an element type "th:block" must not contain the '<' character.
但是当我评论最后一个th:block
时一切正常。怎么了?
问题出在 <
最佳答案
使用这个:
< for <
> for >
≤ for <=
≥ for >=
关于java - thymeleaf :block not working any more,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45311059/