public class BeanUtils
extends org.springframework.beans.BeanUtils
Constructor and Description |
---|
BeanUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
bean2Map(Object obj,
boolean isAllowNull)
bean 转为map
|
static void |
copyProperties(Object source,
Object target)
重写copyProperties,忽略NULL值
|
static void |
copyProperties(Object source,
Object target,
String[] ignoreList)
重写copyProperties,NULL值,可以拷贝
增加默认忽略字段 modify by zhangguoqing at 2017年4月8日16:13:55
|
static void |
map2Bean(Map<String,Object> targetMap,
Object obj)
map转bean
|
copyProperties, findDeclaredMethod, findDeclaredMethodWithMinimalParameters, findEditorByConvention, findMethod, findMethodWithMinimalParameters, findMethodWithMinimalParameters, findPropertyForMethod, findPropertyForMethod, findPropertyType, getPropertyDescriptor, getPropertyDescriptors, getWriteMethodParameter, instantiate, instantiateClass, instantiateClass, instantiateClass, isSimpleProperty, isSimpleValueType, resolveSignature
public static void copyProperties(Object source, Object target, String[] ignoreList) throws org.springframework.beans.BeansException
source
- 拷贝元实体target
- 拷贝目标实体org.springframework.beans.BeansException
- 抛出异常public static void copyProperties(Object source, Object target) throws org.springframework.beans.BeansException
source
- target
- org.springframework.beans.BeansException
public static Map<String,Object> bean2Map(Object obj, boolean isAllowNull)
obj
- bean对象isAllowNull
- 空字段是否转换 false 不转换Copyright © 2021. All rights reserved.