Thymeleaf 使用过程当中的一些记录

Thymeleaf格式化时间:html

th:value="${#dates.format(gw.regDT,'yyyy-MM-ddHH:mm:ss')}"

Thymeleaf select反选:spa

<select id="status" name="status" th:field="${gw.status}" th:value="${gw.status}">
    <option  th:selected="${gw.status=='0'}" value="0">请选择</option>
    <option  th:selected="${gw.status=='1'}" value="1">离线</option>
    <option  th:selected="${gw.status=='2'}" value="2">在线</option>
</select>
相关文章
相关标签/搜索