【发布时间】:2018-03-22 13:14:20
【问题描述】:
我想知道 Thymeleaf 中 th:if 中多个表达式的正确语法是什么。 到目前为止,我有这样的事情:
<a style="color:blue" th:href="@{/approveAndJoin/{name}(name=${outbox.receiverName})}" th:if="${not #strings.startsWith(outbox.status, 'P')}">Join Team?!</a>
正确的语法是这样的: (伪代码)
th:if="${not #strings.startsWith(outbox.status, 'P') && #strings.startsWith(inbox.status, 'A'}"
我已经阅读了各种手册,但还没有发现如何做到这一点。
【问题讨论】: