Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
a87e1d01
Commit
a87e1d01
authored
Dec 19, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正getSubject命名
parent
ef91e71d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java
+6
-6
No files found.
ruoyi-framework/src/main/java/com/ruoyi/framework/util/ShiroUtils.java
View file @
a87e1d01
...
...
@@ -19,7 +19,7 @@ import com.ruoyi.system.domain.SysUser;
*/
public
class
ShiroUtils
{
public
static
Subject
getSubjct
()
public
static
Subject
getSubj
e
ct
()
{
return
SecurityUtils
.
getSubject
();
}
...
...
@@ -31,13 +31,13 @@ public class ShiroUtils
public
static
void
logout
()
{
getSubjct
().
logout
();
getSubj
e
ct
().
logout
();
}
public
static
SysUser
getSysUser
()
{
SysUser
user
=
null
;
Object
obj
=
getSubjct
().
getPrincipal
();
Object
obj
=
getSubj
e
ct
().
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
=
getSubj
e
ct
();
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
getSubj
e
ct
().
getSession
().
getHost
();
}
public
static
String
getSessionId
()
{
return
String
.
valueOf
(
getSubjct
().
getSession
().
getId
());
return
String
.
valueOf
(
getSubj
e
ct
().
getSession
().
getId
());
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment