package com.uas.platform.b2b.support;

import com.uas.platform.b2b.model.User;

/**
 * 每次请求服务器时，用户信息存放在本次线程中
 * 
 * @author yingp
 * 
 */
public class SystemSession {

	private static ThreadLocal<User> local = new ThreadLocal<User>();

	public static void setUser(User session) {
		local.set(session);
	}

	public static User getUser() {
		return local.get();
	}
	
	public static void clear() {
		local.set(null);
	}

}
