新火炬后端单体项目初始化代码
Houjie
3 天以前 563a74081df215497e5acd5de54e74445c4bd18b
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;
        }
    }
}