// 获取UserFrom表单数据
UserFrom userForm = (UserFrom)from;
// 构造一个User对象
User user = new User();
// 赋值
user.setUserName(userFrom.getUserName);
user.setUserAge(userForm.getUserAge);
user.setBirthday(userForm.getBirthday);
......
相当于以下情况.
// 获取UserFrom表单数据
UserFrom userForm = (UserFrom)from;
// 构造一个User对象
User user = new User();
// 赋值
BeanUtils.copyProperties(user,userFrom);