mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-03 09:14:01 +00:00
fix[proxy]: the annotations of the bean of the parent class cannot be scanned
This commit is contained in:
1 parent
e2522ac333
commit
06f716feb9
5 files changed
+6
-28
No files matched your search
@@ -101,16 +101,12 @@ public class SchedulerContext implements ApplicationListener<ApplicationContextE
|
||||
var bean = applicationContext.getBean(beanName);
|
||||
var clazz = bean.getClass();
|
||||
|
||||
var methods = ReflectionUtils.getMethodsByAnnoInPOJOClass(bean.getClass(), Scheduler.class);
|
||||
var methods = ReflectionUtils.getMethodsByAnnotation(clazz, Scheduler.class);
|
||||
|
||||
if (ArrayUtils.isEmpty(methods)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ReflectionUtils.isPojoClass(clazz)) {
|
||||
logger.warn("调度注册类[{}]不是POJO类,父类的调度不会被扫描到", clazz);
|
||||
}
|
||||
|
||||
try {
|
||||
for (var method : methods) {
|
||||
var schedulerMethod = method.getAnnotation(Scheduler.class);
|
||||
|
||||
Reference in new issue
Block a user