Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ThreadLocal에 저장되어 있는 DataSourceType을 가져온다.
import kr.sidnancy.common.type.DataSourceType;
* @author sidnancy81
public class ContextHolder {
private static final ThreadLocal<DataSourceType> contextHolder = new ThreadLocal<DataSourceType>();
public static void setDataSourceType(DataSourceType dataSourceType){
public static DataSourceType getDataSourceType(){
return contextHolder.get();
public static void clearDataSourceType(){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.