diff --git a/sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/factory/ReferenceFactoryBean.java b/sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/factory/ReferenceFactoryBean.java index f361eaf48..20150117a 100644 --- a/sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/factory/ReferenceFactoryBean.java +++ b/sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/factory/ReferenceFactoryBean.java @@ -79,7 +79,13 @@ public Object getObject() throws Exception { @Override public Class getObjectType() { - return getInterfaceClass(); + try { + Class type = getInterfaceClass(); + return type != null ? type : ReferenceFactoryBean.class; + } catch (Throwable t) { + // Class not found + return ReferenceFactoryBean.class; + } } @Override