tutool工具包學習

2021-09-12

數據庫操作

        DbConfig conf = new DbConfig("jdbc:mysql://localhost:3306/test?useUnicode=true", "root", "123456");
        conf.setMaxActive(1);
        PooledDataSource ds = new PooledDataSource(conf);
        Connection c = ds.getConnection();
        SqlConnRunner r = SqlConnRunner.create(ds);
        Entity entity = new Entity("tb_cus");
        long l = r.count(c,  entity);
        System.out.println(l);

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章