public final class DynamicDataSourceContextHolder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clearDataSourceLookupKey()
清空当前线程数据源
如果当前线程是连续切换数据源
只会移除掉当前线程的数据源名称
|
static String |
getDataSourceLookupKey()
获得当前线程数据源
|
static void |
setDataSourceLookupKey(String dataSourceLookupKey)
设置当前线程数据源
如非必要不要手动调用,调用后确保最终清除
|
public static String getDataSourceLookupKey()
public static void setDataSourceLookupKey(String dataSourceLookupKey)
如非必要不要手动调用,调用后确保最终清除
dataSourceLookupKey - 数据源名称public static void clearDataSourceLookupKey()
如果当前线程是连续切换数据源 只会移除掉当前线程的数据源名称
Copyright © 2018–2019 baomidou. All rights reserved.