![JAR search and dependency download from the Maven repository](/logo.png)
mtons.pojos.UserContextHolder Maven / Gradle / Ivy
/*
+--------------------------------------------------------------------------
| mtons [#RELEASE_VERSION#]
| ========================================
| Copyright (c) 2014, 2015 mtons. All Rights Reserved
| http://www.mtons.com
|
+---------------------------------------------------------------------------
*/
package mtons.pojos;
/**
* 用户上下文Holder和当前线程相关
*
* @author langhsu
*
*/
public class UserContextHolder {
private static ThreadLocal local = new ThreadLocal<>();
public static UserProfile getProfile(){
return local.get();
}
public static void setProfile(UserProfile context){
local.set(context);
}
public static void remove(){
local.remove();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy