Object 转 String

做项目中 :

map 为Map<String,Object>

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

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

原文地址:https://www.cnblogs.com/chong518/p/10276399.html