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
7f557a26
Commit
7f557a26
authored
Aug 23, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 配置
parent
c46648bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
...ain/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
+1
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
+6
-7
ch-wx-api/src/main/resources/application.yml
ch-wx-api/src/main/resources/application.yml
+2
-2
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
View file @
7f557a26
...
...
@@ -6,7 +6,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -15,7 +14,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.util.HashMap
;
import
java.util.Map
;
@Component
public
class
LoginInterceptor
implements
HandlerInterceptor
{
Logger
logger
=
LoggerFactory
.
getLogger
(
LoginInterceptor
.
class
);
...
...
@@ -27,6 +25,7 @@ public class LoginInterceptor implements HandlerInterceptor {
*/
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
logger
.
info
(
"进入拦截器"
);
String
token
=
request
.
getHeader
(
"Authorization"
);
if
(
StringUtils
.
isNotBlank
(
token
))
{
if
(
userTokenManager
.
checkLogin
(
token
))
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/util/RedisUtil.java
View file @
7f557a26
package
com.wwdz.ch.wx.util
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
/**
* redis 工具类
...
...
@@ -77,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
));
redisTemplate
.
delete
(
(
Collection
<
String
>)
CollectionUtils
.
arrayToList
(
key
));
}
}
}
...
...
ch-wx-api/src/main/resources/application.yml
View file @
7f557a26
...
...
@@ -5,8 +5,8 @@ spring:
encoding
:
UTF-8
servlet
:
multipart
:
max-file-size
:
50M
b
max-request-size
:
80M
b
max-file-size
:
50M
B
max-request-size
:
80M
B
location
:
/tmp
...
...
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