mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
add methods
This commit is contained in:
@@ -564,11 +564,13 @@ public class BeanUtilTest {
|
||||
|
||||
@Test
|
||||
public void copyBeanPropertiesFunctionFilterTest() {
|
||||
//https://gitee.com/dromara/hutool/pulls/590
|
||||
Person o = new Person();
|
||||
o.setName("asd");
|
||||
o.setAge(123);
|
||||
o.setOpenid("asd");
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
CopyOptions copyOptions = CopyOptions.create().setIgnoreProperties(Person::getAge,Person::getOpenid);
|
||||
Person n = new Person();
|
||||
BeanUtil.copyProperties(o, n, copyOptions);
|
||||
|
Reference in New Issue
Block a user