在Html页面中,使用el表达式,绑定后台值没有问题,但怎么使用后台的方法对值进行处理呢?
<th:block th:each="post : ${users.list}">
<tr th:cid="${post.uid}">
<td><th:block th:text="${post.created}"/></td>
<td><th:block th:text="${com.gateway.website.utils.Commons.fmtdate(post.created)}"/></td>
</tr>
</th:block>
fmtdate方法是个时间戳转换为日期的方法。
单独写第一个td是是有值的,写第二个会报错,Exception evaluating SpringEL expression
不清楚怎么用,还是说fmtdate方法这边要做什么工作,往指导...谢谢