java - freemarker number_to_datetime的问题
阿神
阿神 2017-04-17 14:38:20
[Java讨论组]

最近刚使用freemarker

数据库中存的是时间截,使用的是System.currentTimeMillis();

在freemarker模块中,使用

${user.regtime?numbertodatetime} 总是出错

Caused by: freemarker.core.NonNumericalException: For "?numbertodatetime" left-hand operand: Expected a number, but this has evaluated to a string+extended_hash (String wrapped into f.e.b.StringModel):
==> (x) [in template "WEB-INF/views

但直接这样写却能正常显示:


${x.numbertodatetime} 这样就可以

阿神
阿神

闭关修行中......

全部回复(1)
怪我咯

怎么这个网站还会吃下划线?

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号