跳至主要內容

druid

chanchaw小于 1 分钟languagejava

概述

阿里开源的 java - mysql 数据源

案例

读取 properties 文件

import java.util.Properties;

Properties prop = new Properties();
prop.load(DruidUtils.class.getClassLoader().getResourceAsStream("druid.properties"));

上面的代码要求 properties 文件在 resources 目录下

druid
druid

事务

演示仓库:https://gitee.com/chanchaw/druid-trans-demo.gitopen in new window