public static <T> Map<String,Object> beanToMap(T bean){
Map<String,Object> map = new HashMap<>(16);
if(bean != null){
BeanMap beanMap = BeanMap.create(bean);
for (Object key : beanMap.keySet()) {
if(beanMap.get(key)!= null){
map.put(key+"",beanMap.get(key));
}
}
}
return map;
}
java bean转map
最新推荐文章于 2024-07-31 04:31:57 发布