Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sl-gateway
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhouwei
sl-gateway
Commits
d9dd2bb5
Commit
d9dd2bb5
authored
Apr 22, 2025
by
zhouwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增未能匹配到token的日志
parent
af9e4fac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ScheduledTasksService.java
...m/nanyan/securitylink/schedule/ScheduledTasksService.java
+1
-1
TokenRouteMappingService.java
...nanyan/securitylink/service/TokenRouteMappingService.java
+8
-0
No files found.
src/main/java/com/nanyan/securitylink/schedule/ScheduledTasksService.java
View file @
d9dd2bb5
...
...
@@ -25,6 +25,6 @@ public class ScheduledTasksService {
//定时刷新配置
taskScheduler
.
scheduleWithFixedDelay
(()
->
{
refreshConfigSync
.
autoRefreshConfig
();
},
6
0000
);
},
1
0000
);
}
}
src/main/java/com/nanyan/securitylink/service/TokenRouteMappingService.java
View file @
d9dd2bb5
package
com
.
nanyan
.
securitylink
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.nanyan.securitylink.config.FailoverProperties
;
import
com.nanyan.securitylink.config.FailoverProperties.UriConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.util.AntPathMatcher
;
import
java.util.Optional
;
@Slf4j
@Service
@RequiredArgsConstructor
public
class
TokenRouteMappingService
{
...
...
@@ -20,6 +23,11 @@ public class TokenRouteMappingService {
.
flatMap
(
mapping
->
mapping
.
getUriConfigs
().
stream
())
.
filter
(
uriConfig
->
pathMatcher
.
match
(
uriConfig
.
getSourceUri
(),
sourceUri
))
.
findFirst
();
if
(
first
.
isPresent
()){
log
.
info
(
"映射的配置:{}"
,
JSONObject
.
toJSONString
(
first
));
}
else
{
log
.
info
(
"token:{} sourceUri:{} 未配置"
,
token
,
sourceUri
);
}
return
first
;
}
...
...
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