修正getSubject命名

pull/56/head
RuoYi 2018-12-19 18:10:44 +08:00
parent ef91e71d7b
commit a87e1d019d
1 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ import com.ruoyi.system.domain.SysUser;
*/
public class ShiroUtils
{
public static Subject getSubjct()
public static Subject getSubject()
{
return SecurityUtils.getSubject();
}
@ -31,13 +31,13 @@ public class ShiroUtils
public static void logout()
{
getSubjct().logout();
getSubject().logout();
}
public static SysUser getSysUser()
{
SysUser user = null;
Object obj = getSubjct().getPrincipal();
Object obj = getSubject().getPrincipal();
if (StringUtils.isNotNull(obj))
{
user = new SysUser();
@ -48,7 +48,7 @@ public class ShiroUtils
public static void setSysUser(SysUser user)
{
Subject subject = getSubjct();
Subject subject = getSubject();
PrincipalCollection principalCollection = subject.getPrincipals();
String realmName = principalCollection.getRealmNames().iterator().next();
PrincipalCollection newPrincipalCollection = new SimplePrincipalCollection(user, realmName);
@ -75,12 +75,12 @@ public class ShiroUtils
public static String getIp()
{
return getSubjct().getSession().getHost();
return getSubject().getSession().getHost();
}
public static String getSessionId()
{
return String.valueOf(getSubjct().getSession().getId());
return String.valueOf(getSubject().getSession().getId());
}
/**