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
5873da87
Commit
5873da87
authored
Feb 04, 2023
by
RuoYi
Browse files
屏蔽定时任务bean违规的字符
parent
4f1933e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java
View file @
5873da87
...
...
@@ -134,6 +134,8 @@ public class ScheduleUtils
return
StringUtils
.
containsAnyIgnoreCase
(
invokeTarget
,
Constants
.
JOB_WHITELIST_STR
);
}
Object
obj
=
SpringUtils
.
getBean
(
StringUtils
.
split
(
invokeTarget
,
"."
)[
0
]);
return
StringUtils
.
containsAnyIgnoreCase
(
obj
.
getClass
().
getPackage
().
getName
(),
Constants
.
JOB_WHITELIST_STR
);
String
beanPackageName
=
obj
.
getClass
().
getPackage
().
getName
();
return
StringUtils
.
containsAnyIgnoreCase
(
beanPackageName
,
Constants
.
JOB_WHITELIST_STR
)
&&
!
StringUtils
.
containsAnyIgnoreCase
(
beanPackageName
,
Constants
.
JOB_ERROR_STR
);
}
}
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