gpt4 book ai didi

java - Struts 2 中的格式编号 tag

转载 作者:太空狗 更新时间:2023-10-29 23:01:44 27 4
gpt4 key购买 nike

我想格式化 <s:property value="summary.total"/> 显示的数字Struts 2 中的标记。有一个 double值(value)。我怎样才能做到这一点?我应该使用 OGNL 吗? ?

或者也许我必须使用 <s:text/>在资源文件中标记并定义我的格式?

最佳答案

速度更快

<s:property value="getText('{0,number,#,##0.00}',{summary.total})"/>

幸运!!

关于java - Struts 2 中的格式编号 <s :property/> tag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1558662/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com