快速将前台接收的数据封装到对象中
try {
BeanUtils.populate(user, request.getParameterMap());
// System.out.println(user.getUsername());
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Beanutils
最新推荐文章于 2024-01-04 21:30:00 发布