freemarker数字格式化

 
freemarker在解析数据格式的时候,自动默认将数字按3为分割(1,000),这个问题给操作带来一定的额外处理复杂度,解决方法有如下几种: 
    1、在模板中直接加.toString()转化数字为字符串,如:${languageList.id.toString()}; 
    2、在freemarker配置文件freemarker.properties加number_format=#或者number_format=0; 
    3、在模板中直接加<#setting number_format="#">或者<#setting number_format="0">,如:<#if AdminLanguagePaginationMsg?exists> 
<#setting number_format="#">

 

 

相关文章:

  • 2022-12-23
  • 2021-03-28
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-04
  • 2022-12-23
  • 2021-11-30
  • 2022-01-23
  • 2021-07-13
  • 2022-12-23
相关资源
相似解决方案