教育训练处考试制证系统后端
zhangf
2024-06-24 21362fd048558832cdcaca8ee957d2d7aa753be2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.ruoyi.framework.security.context;
 
 
import com.ruoyi.common.core.domain.model.InstitutionUser;
 
/**
 * 三方身份信息
 */
public class ThreeInContextHolder {
    private static final ThreadLocal<InstitutionUser> contextHolder = new ThreadLocal<>();
 
    public static InstitutionUser getContext()
    {
        return contextHolder.get();
    }
 
    public static void setContext(InstitutionUser context)
    {
        contextHolder.set(context);
    }
 
    public static void clearContext()
    {
        contextHolder.remove();
    }
}