五月天青色头像情侣网名,国产亚洲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)典-多線程和智能指針的評論 (共 條)

分享到微博請遵守國家法律
庆安县| 龙山县| 阳泉市| 鄱阳县| 兰州市| 肇源县| 宜宾县| 天等县| 怀集县| 韶山市| 慈利县| 德州市| 定远县| 洪江市| 郓城县| 临海市| 祁东县| 奉新县| 花垣县| 临朐县| 德州市| 江孜县| 南乐县| 中牟县| 阳曲县| 格尔木市| 河池市| 来安县| 临沂市| 栾城县| 邻水| 葫芦岛市| 青龙| 沂源县| 福安市| 凤台县| 平陆县| 枝江市| 青铜峡市| 石狮市| 达拉特旗|