thymeleaf 判断语句
两个值的判断
th:if = "${变量值==1?值1:值2}";
<td th:text="${stuinfo.stuSex == 0?男:女}"></td>
<td th:attr="checked=${stuinfo.stuSex == '男'?true:false}"></td>
两个以上的判断
<td th:switch = "${stuinfo.state}">
<span th:case = "1">已报名</span>
<span th:case = "2">已入学</span>
<span th:case = "3">已毕业</span>
</td>