dubbo
dubbo copied to clipboard
Dubbo3.1 找不到ServiceBeanExportedEvent的监听器
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 3.1.0-SNAPSHOT
- Operating System version: windows11
- Java version: 11
Steps to reproduce this issue
- org.apache.dubbo.config.spring.ServiceBean#publishExportEvent()代码如下:
private void publishExportEvent() {
ServiceBeanExportedEvent exportEvent = new ServiceBeanExportedEvent(this);
applicationEventPublisher.publishEvent(exportEvent);
}
但我在3.1分支中并没有找到ServiceBeanExportedEvent的监听器
- 与之类似的,org.apache.dubbo.config.ServiceListener并未找到其有效的实现类,继承者而在ServiceConfig中init()方法如下使用:
public void init() {
if (this.initialized.compareAndSet(false, true)) {
// load ServiceListeners from extension
ExtensionLoader<ServiceListener> extensionLoader = this.getExtensionLoader(ServiceListener.class);
this.serviceListeners.addAll(extensionLoader.getSupportedExtensionInstances());
}
initServiceMetadata(provider);
serviceMetadata.setServiceType(getInterfaceClass());
serviceMetadata.setTarget(getRef());
serviceMetadata.generateServiceKey();
}
debug查看发现serviceListeners为空
那这两处是否为升级过程中的代码冗余?
这两处是Dubbo对外提供的监听功能,设计给业务自定义扩展使用的
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
是这样子,好的
***@***.***
---- 回复的原邮件 ----
发件人
Albumen ***@***.***>
发送日期
2022年7月27日 16:57
收件人
***@***.***>
抄送人
***@***.***>
,
***@***.***>
主题
Re: [apache/dubbo] Dubbo3.1 找不到ServiceBeanExportedEvent的监听器 (Issue #10358)
这两处是Dubbo对外提供的监听功能,设计给业务自定义扩展使用的
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Dubbo3.1发版本了吗,咋就用上了;怎么引用呢,编译源码吗
目前 3.1.0-SNAPSHOT 已经发布到 apache repository 的 snapshot 仓库,正式版本月中发布