Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
9248b8f0
Commit
9248b8f0
authored
Sep 08, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 拦截器
parent
6c226395
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+1
-7
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
...ain/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
+2
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
9248b8f0
...
...
@@ -31,12 +31,6 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
// , "/wx/item/page", "/wx/item/info", "/wx/item/findNames"
// , "/wx/favorites/info", "/wx/favorites/itemList"
// , "/wx/keyword/recommend", "/wx/queryPrice/**");
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/item/page"
,
"/wx/item/info"
,
"/wx/item/findNames"
,
"/wx/favorites/info"
,
"/wx/favorites/itemList"
,
"/wx/keyword/recommend"
,
"/wx/queryPrice/**"
);
,
"/wx/queryPrice/**"
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
View file @
9248b8f0
...
...
@@ -44,7 +44,9 @@ public class LoginInterceptor implements HandlerInterceptor {
String
token
=
request
.
getHeader
(
"Authorization"
);
Switch
switchh
=
switchService
.
findOnly
();
boolean
isOpen
=
Objects
.
nonNull
(
switchh
)
&&
switchh
.
getState
()
==
1
;
logger
.
info
(
"isOpen:"
+
isOpen
);
String
url
=
request
.
getRequestURI
();
logger
.
info
(
"url:"
+
url
);
if
(!
isOpen
)
{
if
(
Arrays
.
asList
(
excludeUrl
).
contains
(
url
))
{
return
true
;
...
...
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