springboot theamleaf 格式化日期 需要 判空

theamleaf 的 ${ #dates.format  格式化日期 判空 的写法:

<td th:text = "${ role.createTime == null } ? '' : ${ #dates.format( role.createTime, 'yyyy-MM-dd' ) }"></td>

参考:

https://blog.csdn.net/m0_38043362/article/details/78064177

https://www.cnblogs.com/suncj/p/4030393.html

https://bbs.csdn.net/topics/392364154

猜你喜欢

转载自blog.csdn.net/beguile/article/details/86490074