package com.keao.edu.common.tenant;


public class TenantContextHolder {
	

	private static final ThreadLocal<Object> tenantContextHolder = new ThreadLocal<Object>();

	public static void setTenantId(String tenantId) {
		tenantContextHolder.set(tenantId);
	}

	/**
	 * 获取数据源
	 * @return
	 */
	public static Object getTenantId() {
		return tenantContextHolder.get();
	}

	/**
	 * 重置数据源
	 */
	public static void clearTenantId() {
		tenantContextHolder.remove();
	}

}
