SerialUtilsV.java 996 Bytes
package com.huaheng.common.utils.security;

import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.bean.BeanUtils;
import com.huaheng.framework.shiro.realm.UserRealm;
import com.huaheng.pc.config.warehouse.service.WarehouseService;
import com.huaheng.pc.system.user.domain.User;
import gnu.io.SerialPort;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.RealmSecurityManager;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.SimplePrincipalCollection;
import org.apache.shiro.subject.Subject;

import javax.annotation.Resource;
import java.util.List;

/**
 * shiro 工具类
 * 
 * @author huaheng
 */
public class SerialUtilsV
{
    public static Subject getSubjct()
    {
        return SecurityUtils.getSubject();
    }

    public static Session getSession()
    {
        return SecurityUtils.getSubject().getSession();
    }
    public static SerialPort serialPort=null;
}