public class DruidDSFactory extends AbstractDSFactory
Modifier and Type | Field and Description |
---|---|
static String |
DS_NAME |
dataSourceName, KEY_ALIAS_DRIVER, KEY_ALIAS_PASSWORD, KEY_ALIAS_URL, KEY_ALIAS_USER, KEY_CONN_PROPS
Constructor and Description |
---|
DruidDSFactory()
构造,使用默认配置文件
|
DruidDSFactory(Setting setting)
构造
|
Modifier and Type | Method and Description |
---|---|
protected DataSource |
createDataSource(String jdbcUrl,
String driver,
String user,
String pass,
Setting poolSetting)
创建新的
DataSource |
close, destroy, equals, getDataSource, getSetting, hashCode
close, create, get, get, getCurrentDSFactory, getDataSource, setCurrentDSFactory
public static final String DS_NAME
public DruidDSFactory()
public DruidDSFactory(Setting setting)
setting
- 数据库配置protected DataSource createDataSource(String jdbcUrl, String driver, String user, String pass, Setting poolSetting)
AbstractDSFactory
DataSource
createDataSource
in class AbstractDSFactory
jdbcUrl
- JDBC连接字符串driver
- 数据库驱动类名user
- 用户名pass
- 密码poolSetting
- 分组下的连接池配置文件DataSource
Copyright © 2021. All rights reserved.