Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
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
liyang
sts网站
Commits
5188d56b
Commit
5188d56b
authored
Sep 18, 2021
by
若依
Committed by
Gitee
Sep 18, 2021
Browse files
Options
Browse Files
Download
Plain Diff
!321 修复 全局限流key会多出一个"-" 将其移动到IP后面 去除多余的空格
Merge pull request !321 from 疯狂的狮子Li/N/A
parents
12ab8b03
f3a8b462
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
RateLimiterAspect.java
...n/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java
+2
-2
No files found.
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java
View file @
5188d56b
...
...
@@ -105,12 +105,12 @@ public class RateLimiterAspect
StringBuffer
stringBuffer
=
new
StringBuffer
(
rateLimiter
.
key
());
if
(
rateLimiter
.
limitType
()
==
LimitType
.
IP
)
{
stringBuffer
.
append
(
IpUtils
.
getIpAddr
(
ServletUtils
.
getRequest
()));
stringBuffer
.
append
(
IpUtils
.
getIpAddr
(
ServletUtils
.
getRequest
()))
.
append
(
"-"
)
;
}
MethodSignature
signature
=
(
MethodSignature
)
point
.
getSignature
();
Method
method
=
signature
.
getMethod
();
Class
<?>
targetClass
=
method
.
getDeclaringClass
();
stringBuffer
.
append
(
"-"
).
append
(
targetClass
.
getName
()).
append
(
"-
"
).
append
(
method
.
getName
());
stringBuffer
.
append
(
targetClass
.
getName
()).
append
(
"-
"
).
append
(
method
.
getName
());
return
stringBuffer
.
toString
();
}
}
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