五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

手寫數(shù)據(jù)庫連接池-C++11代碼實戰(zhàn)經(jīng)典-多線程和智能指針

2023-08-21 09:50 作者:每天3個拼課小技巧__  | 我要投稿

? public static void test01() throws Exception{ ? ? ? ?// 1. 創(chuàng)建一個Properties對象,讓其去讀取druid.properties文件 ? ? ? ?Properties properties = new Properties(); ? ? ? ?// 1.1 將druid.properties配置文件轉(zhuǎn)成字節(jié)輸入流// ? ? ? ?FileInputStream is = new FileInputStream("絕對路徑"); ? ? ? ?// 1.2 使用相對路徑來將配置文件轉(zhuǎn)成字節(jié)輸入流,可以使用類加載器來讀取類路徑下文件 ? ? ? ?// 獲取ClassLoader對象 ? ? ? ?ClassLoader classLoader = TestDataSource.class.getClassLoader(); ? ? ? ?InputStream is = classLoader.getResourceAsStream("druid.properties"); ? ? ? ?// 1.2 使用properties對象加載流 ? ? ? ?properties.load(is); ? ? ? ?// 2. 使用創(chuàng)建DruidDataSourceFactory創(chuàng)建Druid的連接池對象 ? ? ? ?DataSource dataSource = DruidDataSourceFactory.createDataSource(properties); ? ? ? ?// 3. 從連接池中取出一個連接使用 ? ? ? ?Connection connection1 = dataSource.getConnection();

手寫數(shù)據(jù)庫連接池-C++11代碼實戰(zhàn)經(jīng)典-多線程和智能指針的評論 (共 條)

分享到微博請遵守國家法律
绩溪县| 虎林市| 特克斯县| 宣化县| 吉木萨尔县| 兖州市| 莒南县| 博白县| 金阳县| 永昌县| 祁阳县| 延长县| 道孚县| 织金县| 浮山县| 黔东| 玉树县| 博客| 山东省| 万安县| 防城港市| 宁陕县| 阿拉善盟| 东乌| 茂名市| 古丈县| 梁山县| 巴塘县| 行唐县| 昌江| 修武县| 衢州市| 兴安县| 芒康县| 达孜县| 潞西市| 陇西县| 萨迦县| 沽源县| 融水| 郯城县|