@@ -0,0 +1,1053 @@
+package cq.core.orm;%0D%0A%0D%0Aimport java.sql.ResultSet;%0D%0Aimport java.sql.SQLException;%0D%0Aimport java.sql.Statement;%0D%0A%0D%0Aimport org.apache.commons.dbcp.BasicDataSource;%0D%0A%0D%0A/**%0D%0A * %0D%0A * @author chenqing24@163.com%0D%0A */%0D%0Apublic class BasicDbcp %7B%0D%0A%0D%0A%09/**%0D%0A%09 * @param args%0D%0A%09 * @throws SQLException %0D%0A%09 */%0D%0A%09public static void main(String%5B%5D args) throws SQLException %7B%0D%0A%09%09// TODO Auto-generated method stub%0D%0A%09%09String url=%22jdbc:h2:~/test%22;%0D%0A        String dr=%22org.h2.Driver%22;%0D%0A        //%E5%AE%9E%E4%BE%8B%E5%8C%96%E6%95%B0%E6%8D%AE%E6%BA%90%E5%AF%B9%E8%B1%A1%0D%0A        BasicDataSource ds=new BasicDataSource();%0D%0A        //%E8%AE%BE%E7%BD%AE%E5%B1%9E%E6%80%A7%0D%0A        ds.setDriverClassName(dr);%0D%0A        ds.setUrl(url);%0D%0A        ds.setUsername(%22sa%22);%0D%0A        ds.setPassword(%22%22);%0D%0A        System.err.println(%22%E8%A2%AB%E5%8C%85%E8%A3%B9%E7%9A%84%E6%95%B0%E6%8D%AE%E8%BF%9E%E6%8E%A5(%E5%86%85%E9%83%A8%E7%A7%81%E6%9C%89%E7%B1%BB)%EF%BC%9A%22+ds.getConnection().getClass());%0D%0A        Statement sta= ds.getConnection().createStatement();%0D%0A        ResultSet rs= sta.executeQuery(%22SELECT * FROM TEST ORDER BY ID%22);%0D%0A        while(rs.next())%7B%0D%0A            System.out.println(rs.getString(%22NAME%22));%0D%0A        %7D%0D%0A        rs.close();%0D%0A        sta.close();%0D%0A        ds.close();%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

use h2 as db, add basicDbcp