package com.zteits.job.config.datasource; /** * 作用: * 1、保存一个线程安全的DatabaseType容器 */ public class DatabaseContextHolder { private static final ThreadLocal contextHolder = new ThreadLocal<>(); public static DatabaseType getDatabaseType(){ return contextHolder.get(); } public static void setDatabaseType(DatabaseType type) { contextHolder.set(type); } }