日期:2014-05-20  浏览次数:20701 次

这段代码什么意思,看不懂,各位帮帮忙
/**
public <T> T fillBean(Class<T> beanClass)
{
T bean = null;
try
{
bean = beanClass.newInstance();
BeanUtils.populate(bean, request.getParameterMap());
} catch (InstantiationException e)
{
e.printStackTrace();
} catch (IllegalAccessException e)
{
e.printStackTrace();
} catch (InvocationTargetException e)
{
e.printStackTrace();
}
return bean;
}

------解决方案--------------------
BeanUtils.populate(bean, request.getParameterMap());
将map转换成bean