th:if、th:unless
th:if 如果值为true 则显示出该标签 否则 不显示(隐藏)
#lists.isEmpty(userList) true 集合为空
#lists.isEmpty(userList) false 集合非空
<h3 th:if ="not ${#lists.isEmpty(userList)}">显示 出来userList非空 </h3>
<h3 th:unless =" ${#lists.isEmpty(userList)}">显示 出来userList非空 </h3>
th:unless和th:if 相反
th:switch以及th:case
<div th:switch="${sex}">
<p th:case="1">女</p>
<p th:case="${man}">男</p>
<!--均不满足 为以下值-->
<p th:case="*">未知</p>
</div>
map.put("sex",2);
map.put("man",2);