Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
5188d56b
Commit
5188d56b
authored
Sep 18, 2021
by
若依
Committed by
Gitee
Sep 18, 2021
Browse files
!321 修复 全局限流key会多出一个"-" 将其移动到IP后面 去除多余的空格
Merge pull request !321 from 疯狂的狮子Li/N/A
parents
12ab8b03
f3a8b462
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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