public class SimpleDataSource extends AbstractDataSource
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DB_CONFIG_PATH
默认的数据库连接配置文件路径
|
Constructor and Description |
---|
SimpleDataSource(ConnectionConfig<?> config)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
clone, getLoginTimeout, getLogWriter, getParentLogger, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
public static final String DEFAULT_DB_CONFIG_PATH
public SimpleDataSource(ConnectionConfig<?> config)
config
- 数据库连接配置public Connection getConnection() throws SQLException
SQLException
public Connection getConnection(String username, String password) throws SQLException
SQLException
public void close()
Copyright © 2025. All rights reserved.