public interface IToolsDbHelper
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addDataSource(String key,
com.alibaba.druid.pool.DruidDataSource dataSource)
添加数据源
|
void |
clear()
清空所有数据源
|
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate()
获取数据源连接
|
boolean |
isExistDataSource(String key)
查询是否包含指定的数据源
|
Set<String> |
keySet()
数据源key列表
|
void |
remove()
重置缓存(连接使用完后需调用)
|
void |
removeDataSource(String key)
移除数据源
|
void |
setDataSourceKey(String key)
设置当前数据源
|
long |
size()
数据源数量
|
org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
boolean isExistDataSource(String key)
key - 关键字void addDataSource(@NonNull
String key,
@NonNull
com.alibaba.druid.pool.DruidDataSource dataSource)
key - 标识dataSource - 连接配置void removeDataSource(@NonNull
String key)
key - 标识void clear()
long size()
void setDataSourceKey(@NonNull
String key)
key - 标识void remove()
Copyright © 2022. All rights reserved.