bugfix:获取XxlJob注解方法时,非单例bean引发的报错

pull/16/head
lizhen 5 years ago
parent 670d1ca544
commit cd68af99af

@ -81,7 +81,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
return; return;
} }
// init job handler from method // init job handler from method
String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames(); String[] beanDefinitionNames = applicationContext.getBeanNamesForType(Object.class, false, true);
for (String beanDefinitionName : beanDefinitionNames) { for (String beanDefinitionName : beanDefinitionNames) {
Object bean = applicationContext.getBean(beanDefinitionName); Object bean = applicationContext.getBean(beanDefinitionName);

Loading…
Cancel
Save