提交 6e86a7e4 编写于 作者: 许雪里's avatar 许雪里

NPE隐患处理。

上级 039f8d2b
......@@ -78,6 +78,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
// init job handler from method
String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
if (beanDefinitionNames!=null && beanDefinitionNames.length>0) {
for (String beanDefinitionName : beanDefinitionNames) {
Object bean = applicationContext.getBean(beanDefinitionName);
Method[] methods = bean.getClass().getDeclaredMethods();
......@@ -133,6 +134,8 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
}
}
// ---------------------- applicationContext ----------------------
private static ApplicationContext applicationContext;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册