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
adedb391
Commit
adedb391
authored
Aug 03, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
404错误提示修正
parent
f6798b90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
src/main/java/com/ruoyi/common/utils/security/ShiroUtils.java
+8
-2
src/main/resources/templates/error/404.html
+1
-1
No files found.
src/main/java/com/ruoyi/common/utils/security/ShiroUtils.java
View file @
adedb391
...
...
@@ -7,6 +7,7 @@ import org.apache.shiro.subject.PrincipalCollection;
import
org.apache.shiro.subject.SimplePrincipalCollection
;
import
org.apache.shiro.subject.Subject
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.framework.shiro.realm.UserRealm
;
import
com.ruoyi.project.system.user.domain.User
;
...
...
@@ -36,8 +37,13 @@ public class ShiroUtils
public
static
User
getUser
()
{
User
user
=
new
User
();
BeanUtils
.
copyBeanProp
(
user
,
getSubjct
().
getPrincipal
());
User
user
=
null
;
Object
obj
=
getSubjct
().
getPrincipal
();
if
(
StringUtils
.
isNotNull
(
obj
))
{
user
=
new
User
();
BeanUtils
.
copyBeanProp
(
user
,
obj
);
}
return
user
;
}
...
...
src/main/resources/templates/error/404.html
View file @
adedb391
...
...
@@ -13,7 +13,7 @@
<h1>
404
</h1>
<h3
class=
"font-bold"
>
找不到网页!
</h3>
<div
class=
"error-desc"
>
对不起,您正在寻找的页面
已经找到
。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
对不起,您正在寻找的页面
不存在
。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
<a
href=
"javascript:top.document.location.href='/'"
class=
"btn btn-primary m-t"
>
主页
</a>
</div>
</div>
...
...
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