Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
poc
poc-api
Commits
84d57aed
Commit
84d57aed
authored
Nov 12, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改短信验证码重复发送提示语
parent
53d5c8dd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
RateLimitAspect.java
src/main/java/cn/com/poc/common/aspect/RateLimitAspect.java
+2
-1
exception.properties
...in/resources/framemax-config/i18n/en/exception.properties
+2
-1
exception.properties
...resources/framemax-config/i18n/zh_cn/exception.properties
+2
-1
exception.properties
...resources/framemax-config/i18n/zh_tw/exception.properties
+2
-1
No files found.
src/main/java/cn/com/poc/common/aspect/RateLimitAspect.java
View file @
84d57aed
package
cn
.
com
.
poc
.
common
.
aspect
;
import
cn.com.yict.framemax.core.i18n.I18nMessageException
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
...
...
@@ -23,7 +24,7 @@ public class RateLimitAspect {
String
phone
=
String
.
valueOf
(
args
[
0
]);
// 检查访问计数和时间
if
(
isLimitExceeded
(
phone
))
{
throw
new
RuntimeException
(
"Too many requests. Please try again later.
"
);
throw
new
I18nMessageException
(
"exception/sms.limit.message
"
);
}
Object
result
=
joinPoint
.
proceed
();
...
...
src/main/resources/framemax-config/i18n/en/exception.properties
View file @
84d57aed
...
...
@@ -69,3 +69,4 @@ upload.more.than.10m=The uploaded file cannot exceed 10M file name
error.file.content.is.null
=
Incorrect file, file contents cannot be empty, file name
file.content.more.than.100w
=
The number of characters in a file cannot exceed 100w
collect.limit.message
=
Click too fast, do not repeat the operation
sms.limit.message
=
Do not send it again. Try again later
\ No newline at end of file
src/main/resources/framemax-config/i18n/zh_cn/exception.properties
View file @
84d57aed
...
...
@@ -69,3 +69,4 @@ upload.more.than.10m=\u4E0A\u4F20\u7684\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC710M,\
error.file.content.is.null
=
\u9519\u
8BEF
\u7684\u6587\u
4EF6
\u
FF0C
\u6587\u
4EF6
\u5185\u
5BB9
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A,
\u6587\u
4EF6
\u
540D
file.content.more.than.100w
=
\u6587\u
4EF6
\u5185\u
5BB9
\u
5B57
\u
7B26
\u6570\u
4E0D
\u
80FD
\u
8D85
\u
8FC7100w,
\u6587\u
4EF6
\u
540D
collect.limit.message
=
\u
70B9
\u
51FB
\u
8FC7
\u
5FEB,
\u
8BF7
\u
52FF
\u
91CD
\u
590D
\u
64CD
\u
4F5C
sms.limit.message
=
\u
8BF7
\u
52FF
\u
91CD
\u
590D
\u
53D1
\u9001\u
FF0C
\u
8BF7
\u
7A0D
\u
540E
\u
91CD
\u
8BD5
\ No newline at end of file
src/main/resources/framemax-config/i18n/zh_tw/exception.properties
View file @
84d57aed
...
...
@@ -69,3 +69,4 @@ upload.more.than.10m=\u4E0A\u50B3\u6587\u4EF6\u4E0D\u53EF\u8D85\u904E10M
error.file.content.is.null
=
\u
932F
\u
8AA4
\u7684\u6587\u
4EF6,
\u5185\u
5BB9
\u
4E0D
\u
80FD
\u7232\u
7A7A
file.content.more.than.100w
=
\u6587\u
4EF6
\u5185\u
5BB9
\u
4E0D
\u
53EF
\u
8D85100w
\u
5B57
\u
7B26
collect.limit.message
=
\u
9EDE
\u
64CA
\u
904E
\u
5FEB
\u
FF0C
\u
8ACB
\u
52FF
\u
91CD
\u8907\u
64CD
\u
4F5C
sms.limit.message
=
\u
8ACB
\u
52FF
\u
91CD
\u8907\u
767C
\u9001\u
FF0C
\u
7A0D
\u
5F8C
\u
91CD
\u
8A66
\ No newline at end of file
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