Object 转 String

做项目中 :

map 为Map<String,Object>

a.setmoney(new BigDecimal((String)map.get("money"))); 这么写 一直报错

 

a.setmoney(new BigDecimal(map.get("moeny").toString()));这么改就对了

posted on 2019-01-16 12:51  xiaohehe2  阅读(120)  评论(0编辑  收藏  举报

导航