正在加载图片...
简单的连接池( Connectionpoo) DBSource dbsource newBasicDBSource( "]dbc2properties")i Connection conn=dbsource getConnection ( dbsource. closeConnection(connl)i Connection conn2= dbsource getConnection( System. out. println(conn = conn2)i onlyfun. caterpillar. driver=com mysql jdbc Driver onlyfun. caterpillar. url=jdbc: mysql://localhost: 3306/demo onlyfun. caterpillar.user=root onlyfun caterpillar password=123456 onlyfun. caterpillar coolmax=10简单的连接池(Connectionpool) DBSource dbsource = newBasicDBSource("jdbc2.properties"); Connection conn1 = dbsource.getConnection(); dbsource.closeConnection(conn1); Connection conn2 = dbsource.getConnection(); System.out.println(conn1 == conn2); onlyfun.caterpillar.driver=com.mysql.jdbc.Driver onlyfun.caterpillar.url=jdbc:mysql://localhost:3306/demo onlyfun.caterpillar.user=root onlyfun.caterpillar.password=123456 onlyfun.caterpillar.poolmax=10
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有