平时经常通过其来进行表单提交参数。
/**
* 使用reflect(反射)进行转换
* @param map
* @param beanClass
* @return
* @throws Exception
*/
public static Object map2Bean(Map<String, Object> map, Class<?> beanClass) throws Exception {
if (map == null)
{
return null;
}
Object obj = beanClass.newInstance();//新实例
Field[] fields = obj.getClass().getDeclare