From 9425ac99c7d189c9a8122dc72699f63bf04cdd76 Mon Sep 17 00:00:00 2001 From: liunancun <379370299@qq.com> Date: Tue, 23 Oct 2018 12:17:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8Equartz=E9=9B=86?= =?UTF-8?q?=E6=88=90=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=20(#2677)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit quartz初始化的Bean没有beanName,beanName=null,走这段代码的时候报空指针了。 org.springframework.boot.autoconfigure.quartz.AutowireCapableBeanJobFactory类的createJobInstance方法中使用this.beanFactory.initializeBean(jobInstance, null);初始化的Bean,其beanName=null。 --- .../factory/annotation/DubboConfigBindingBeanPostProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigBindingBeanPostProcessor.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigBindingBeanPostProcessor.java index a033596fe845..356c476178ac 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigBindingBeanPostProcessor.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/DubboConfigBindingBeanPostProcessor.java @@ -75,7 +75,7 @@ public DubboConfigBindingBeanPostProcessor(String prefix, String beanName) { @Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - if (beanName.equals(this.beanName) && bean instanceof AbstractConfig) { + if (beanName != null && beanName.equals(this.beanName) && bean instanceof AbstractConfig) { AbstractConfig dubboConfig = (AbstractConfig) bean;