正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -15,6 +15,7 @@ import com.ruoyi.common.constant.ScheduleConstants; | @@ -15,6 +15,7 @@ import com.ruoyi.common.constant.ScheduleConstants; | ||
| 15 | import com.ruoyi.common.exception.job.TaskException; | 15 | import com.ruoyi.common.exception.job.TaskException; |
| 16 | import com.ruoyi.common.exception.job.TaskException.Code; | 16 | import com.ruoyi.common.exception.job.TaskException.Code; |
| 17 | import com.ruoyi.common.utils.StringUtils; | 17 | import com.ruoyi.common.utils.StringUtils; |
| 18 | +import com.ruoyi.common.utils.spring.SpringUtils; | ||
| 18 | import com.ruoyi.quartz.domain.SysJob; | 19 | import com.ruoyi.quartz.domain.SysJob; |
| 19 | 20 | ||
| 20 | /** | 21 | /** |
| @@ -127,6 +128,7 @@ public class ScheduleUtils | @@ -127,6 +128,7 @@ public class ScheduleUtils | ||
| 127 | { | 128 | { |
| 128 | return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR); | 129 | return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR); |
| 129 | } | 130 | } |
| 130 | - return true; | 131 | + Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]); |
| 132 | + return StringUtils.containsAnyIgnoreCase(obj.getClass().getPackage().getName(), Constants.JOB_WHITELIST_STR); | ||
| 131 | } | 133 | } |
| 132 | } | 134 | } |
-
请 注册 或 登录 后发表评论