泛型为一种bean的list转为另一种泛型bean的list

        try {
            T t = targetClass.newInstance();
            BeanUtils.copyProperties(source,t);
            return t;
        } catch (InstantiationException e) {
            e.printStackTrace();
            return null;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return null;
        }

扫描二维码,在手机上阅读!

发表评论

电子邮件地址不会被公开。 必填项已用*标注