Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
X
xplayer
Project
Project
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
曲欣亮
xplayer
Commits
ec87d199
Commit
ec87d199
authored
May 28, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
d59c4e73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
WebMvcConfig.java
src/main/java/com/egolm/xplayer/config/WebMvcConfig.java
+1
-1
AdminLoginInterceptor.java
...olm/xplayer/config/interceptor/AdminLoginInterceptor.java
+1
-0
No files found.
src/main/java/com/egolm/xplayer/config/WebMvcConfig.java
View file @
ec87d199
...
...
@@ -37,7 +37,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
logInterceptor
).
addPathPatterns
(
"/**"
).
excludePathPatterns
(
"/*.html"
).
excludePathPatterns
(
"/assets/**"
);
registry
.
addInterceptor
(
adminInterceptor
).
addPathPatterns
(
"/admin"
).
excludePathPatterns
(
"/admin/*.html"
).
excludePathPatterns
(
"/assets/**"
).
excludePathPatterns
(
"/admin/doLogin"
);
registry
.
addInterceptor
(
adminInterceptor
).
addPathPatterns
(
"/admin
/**
"
).
excludePathPatterns
(
"/admin/*.html"
).
excludePathPatterns
(
"/assets/**"
).
excludePathPatterns
(
"/admin/doLogin"
);
}
@Override
...
...
src/main/java/com/egolm/xplayer/config/interceptor/AdminLoginInterceptor.java
View file @
ec87d199
...
...
@@ -22,6 +22,7 @@ public class AdminLoginInterceptor extends HandlerInterceptorAdapter {
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
System
.
out
.
println
(
adminTokenService
.
getLoginBean
());
if
(
adminTokenService
.
getLoginBean
()
==
null
)
{
throw
new
XRException
(
"请登陆后再操作"
,
300
);
}
...
...
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