Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init job handler的问题XxlJobSpringExecutor.java #1545

Closed
csj50 opened this issue Mar 31, 2020 · 1 comment
Closed

init job handler的问题XxlJobSpringExecutor.java #1545

csj50 opened this issue Mar 31, 2020 · 1 comment

Comments

@csj50
Copy link

csj50 commented Mar 31, 2020

release2.1.2版本
// init job handler from method
String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
for (String beanDefinitionName : beanDefinitionNames) {
Object bean = applicationContext.getBean(beanDefinitionName);
Method[] methods = bean.getClass().getDeclaredMethods();
...
}
循环获取bean,然后循环获取方法上的注解判断是否为@xxljob
问题是如果有其他bean声明为abstract="true",会抛异常
Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'xxxxxxxx': Bean definition is abstract

@xuxueli
Copy link
Owner

xuxueli commented Apr 7, 2020

你好,这个问题在2.2.0已经修复,可以参考master分支调整下。

@xuxueli xuxueli closed this as completed Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants