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

master
lizhen 5 years ago
parent 670d1ca544
commit cd68af99af
  1. 2
      xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java

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

Loading…
Cancel
Save