<div class="board-master" th:if="${!#arrays.isEmpty(board.boardManagers)}"> <span>版主: </span> <span th:each="boardManagers : ${board.boardManagers}" th:text="${boardManagers.userName} + '、'">版主: 2009</span> <span th:each="boardManagers,boardManagersStat : ${board.boardManagers}" th:if="${boardManagersStat.index} eq (${boardManagersStat.size} - 1)" th:text="${boardManagers.userName}">版主: 2009</span> </div>
java里的运算符
- EQ 就是 EQUAL等于
- NE 就是 NOT EQUAL不等于
- GT 就是 GREATER THAN大于
- LT 就是 LESS THAN小于
- GE 就是 GREATER THAN OR EQUAL 大于等于
- LE 就是 LESS THAN OR EQUAL 小于等于