新火炬后端单体项目初始化代码
cuilei
14 小时以前 76c5ad320495758d4e76d852d96914f1b405ece7
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;
        }
    }
}