public class MultiDataSource
extends org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
多数据源解决方案
MultiDataSource
限定符和类型 | 字段和说明 |
---|---|
private static java.lang.ThreadLocal<java.lang.String> |
HOLDER |
构造器和说明 |
---|
MultiDataSource() |
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
determineCurrentLookupKey() |
static java.lang.String |
getDataSourceName() |
static void |
resetDataSourceName() |
static void |
setDataSourceName(java.lang.String name) |
afterPropertiesSet, determineTargetDataSource, getConnection, getConnection, getResolvedDataSources, getResolvedDefaultDataSource, isWrapperFor, resolveSpecifiedDataSource, resolveSpecifiedLookupKey, setDataSourceLookup, setDefaultTargetDataSource, setLenientFallback, setTargetDataSources, unwrap
protected java.lang.Object determineCurrentLookupKey()
determineCurrentLookupKey
在类中 org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
public static java.lang.String getDataSourceName()
数据源名称
datasource name
public static void setDataSourceName(java.lang.String name)
name
- 数据源名称
datasource name
public static void resetDataSourceName()