在定义XML需要对系统数据初始化时,如果取到的节点是数值类型可以通过
Attribute attribute = (Attribute) a.next();
Class fc = PropertyUtils.getPropertyType(obj, attribute.getName());//得到改属性的真实类型
System.out.println(fc);
BeanUtils.setProperty(obj, attribute.getName(), fc.getConstructor(String.class).newInstance(attribute.getData()));//调用如new Integer("1")的方法进行赋值