使用jsf 转换器,自动封装各种类型,不需要考虑格式转换的问题 <f:convertNumber pattern="#,###"/> 例:2,000; 20,003,000 样式: 或者在java中想要给数据添加