hutool copyProperties Bean to Bean 的坑
@Data
public class User {
private String name;
private int age;
}
@Data
public class UserVO {
@Alias("name")
private String aliasName;
}
public class Test {
public static void main(String[] args)
User user = new User();
user.setAge(1);
user.setName("2333");
UserVO userVO = new UserVO();
BeanUtil.copyProperties(user, userVO);
System.out.println(userVO);
}
}