我想在像这样的 Thymeleaf 模板上设置一些条件,
但它不起作用。
<li th:if="${entry.description != null && entry.owner == true}" th:each="entry : ${entryList}" class="group">
如何使此代码正确工作?
最佳答案
代替
"${entry.description != null && entry.owner == true}"
和"${entry.description != null and entry.owner == true}"
作为引用,您可以查看此线程:http://forum.thymeleaf.org/How-to-have-multiple-condition-in-an-th-if-tag-td4025931.html
让我知道你怎样去
关于spring - 如何在 Thymeleaf 上设置多个条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26174112/