IfmContextHolder(ThreadLocal)

package com.yundaex.wms.config;

public class IfmContextHolder {

    private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();

    public static void setCustomerType(String customerType) {
        contextHolder.set(customerType);
    }

    public static String getCustomerType() {
        return contextHolder.get();
    }

    public static void clearCustomerType() {
        contextHolder.remove();
    }
}

 

posted @ 2017-12-09 09:48  tonggc1668  阅读(118)  评论(0编辑  收藏  举报