mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add methods
This commit is contained in:
parent
e71422bf86
commit
4843e684b0
@ -3,12 +3,13 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
## 5.3.8 (2020-06-10)
|
## 5.3.8 (2020-06-12)
|
||||||
|
|
||||||
### 新特性
|
### 新特性
|
||||||
* 【core 】 增加ISO8601日期格式(issue#904@Github)
|
* 【core 】 增加ISO8601日期格式(issue#904@Github)
|
||||||
* 【setting】 Props异常规则修改(issue#907@Github)
|
* 【setting】 Props异常规则修改(issue#907@Github)
|
||||||
* 【setting】 增加GIF支持
|
* 【setting】 增加GIF支持
|
||||||
|
* 【core 】 复制创建一个Bean对象, 并忽略某些属性(pr#130@Gitee)
|
||||||
|
|
||||||
### Bug修复
|
### Bug修复
|
||||||
* 【json 】 修复append方法导致的JSONConfig传递失效问题(issue#906@Github)
|
* 【json 】 修复append方法导致的JSONConfig传递失效问题(issue#906@Github)
|
||||||
|
@ -605,20 +605,6 @@ public class BeanUtil {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------------------------------- copyProperties
|
// --------------------------------------------------------------------------------------------- copyProperties
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建对应的Class对象并复制Bean对象属性
|
|
||||||
*
|
|
||||||
* @param <T> 对象类型
|
|
||||||
* @param source 源Bean对象
|
|
||||||
* @param tClass 目标Class
|
|
||||||
* @return 目标对象
|
|
||||||
*/
|
|
||||||
public static <T> T copyProperties(Object source, Class<T> tClass) {
|
|
||||||
T target = ReflectUtil.newInstanceIfPossible(tClass);
|
|
||||||
copyProperties(source, target, CopyOptions.create());
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按照Bean对象属性创建对应的Class对象,并忽略某些属性
|
* 按照Bean对象属性创建对应的Class对象,并忽略某些属性
|
||||||
*
|
*
|
||||||
@ -634,16 +620,6 @@ public class BeanUtil {
|
|||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 复制Bean对象属性
|
|
||||||
*
|
|
||||||
* @param source 源Bean对象
|
|
||||||
* @param target 目标Bean对象
|
|
||||||
*/
|
|
||||||
public static void copyProperties(Object source, Object target) {
|
|
||||||
copyProperties(source, target, CopyOptions.create());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复制Bean对象属性<br>
|
* 复制Bean对象属性<br>
|
||||||
* 限制类用于限制拷贝的属性,例如一个类我只想复制其父类的一些属性,就可以将editable设置为父类
|
* 限制类用于限制拷贝的属性,例如一个类我只想复制其父类的一些属性,就可以将editable设置为父类
|
||||||
|
Loading…
x
Reference in New Issue
Block a user