Thymeleaf 使用過程中的一些記錄

Thymeleaf格式化時間:

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

Thymeleaf select反選:

<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>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章