If statement 使用Thymeleaf中的th:if评估多个表达

If statement 使用Thymeleaf中的th:if评估多个表达,if-statement,thymeleaf,If Statement,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中的多个表达式的正确语法是什么。 到目前为止,我有这样的想法:

<a style="color:blue" th:href="@{/approveAndJoin/{name}(name=${outbox.receiverName})}" th:if="${not #strings.startsWith(outbox.status, 'P')}">Join Team?!</a>

我已经阅读了各种手册,但还没有发现如何做到这一点。

您可以将多个条件与关键字
结合起来

e、 g.在您的例子中,th:if=“${not#strings.startsWith(outbox.status,'p')和#strings.startsWith(inbox.status,'A')”

th:if="${not #strings.startsWith(outbox.status, 'P') && #strings.startsWith(inbox.status, 'A'}"