public final class DynamicDataSourceContextHolder extends Object
static void
clear()
static String
peek()
poll()
push(String ds)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static String peek()
public static String push(String ds)
如非必要不要手动调用,调用后确保最终清除
ds
public static void poll()
如果当前线程是连续切换数据源 只会移除掉当前线程的数据源名称
public static void clear()
防止内存泄漏,如手动调用了push可调用此方法确保清除
Copyright © 2018–2022 baomidou. All rights reserved.