淘先锋技术网

首页 1 2 3 4 5 6 7
public static void main(String[] args) throws SQLException {
        DmCustomerExcellent dmCustomerExcellent = new DmCustomerExcellent();
         Connection conn = getConnection();
         Map<String, Class> map = new HashMap<>();
         map.put("dm_customer_excellent", DmCustomerExcellent.class);
         String sql = "select * from dm_customer_excellent where rownum = 1 ";
         Class class1 = map.get("dm_customer_excellent");
         try {
            Object testCustomerExcellent = class1.newInstance();
            if(testCustomerExcellent instanceof DmCustomerExcellent){
                DmCustomerExcellent tt = (DmCustomerExcellent)testCustomerExcellent;
                tt.setActperbusi2("-adfa-f--");
                System.out.println(tt.getActperbusi2());
            }
        } catch (InstantiationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

 

转载于:https://www.cnblogs.com/pypua/articles/9877772.html