场景
对thymeleaf中时间进行格式化显示。
实现
<div class="form-group col-md-4 ml_10"><label>创建时间:</label>
<input type= "text"th:value="${detailsVO==null || detailsVO.gmtCreat ==null ?'':#dates.format(detailsVO.gmtCreat, 'yyyy-MM-dd HH:mm:ss')}" readonly="readonly" class="form-control"/>
</div>
其他处理日期的方式见官方文档:
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#dates
举例:
/*
* ===========================================&#