新火炬后端单体项目初始化代码
cuilei
2 天以前 d419e5f64cf3876b51827e1f6eddc186b6e26182
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.jeecg.modules.mes.utils;
 
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser;
 
public class CommonUtils {
 
    public static LoginUser getCurrentUser() {
        try {
            return (LoginUser) SecurityUtils.getSubject().getPrincipal();
        } catch (Exception e) {
            return null;
        }
    }
}