apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.4k stars 26.41k forks source link

设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释 #2585

Closed WangziwenUnique closed 4 years ago

WangziwenUnique commented 5 years ago

Environment

Steps to reproduce this issue

image image

Expected Result

本应该注入两个协议,但实际上一个协议都没注入

Actual Result

启动spring boot 找不到指定协议名的bean

image

!!而且注入失败也没有提示,不调试根本无感知

测试单个注入不管是jsonrpc还是dubbo都可以成功,但是多个注册就根本注册失败

WangziwenUnique commented 5 years ago

未发现全局Protocol如何配置,spring-configuration-metadata.json中提供的配置中,也未发现soureType对应的类 MultipleDubboConfigBindingProperties。 image

只能暂时采用替代方案,为所有Providers统一配置Protocols,缺点无法为个别接口指定对外协议 image image

beiwei30 commented 5 years ago

this issue should have been addressed by @mercyblitz.

@mercyblitz would you mind to confirm?

mercyblitz commented 5 years ago

MultipleDubboConfigBindingProperties has been removed, however, spring-configuration-metadata.json still works on IDEA.

Before Spring Boot Starter 0.2.1 or 0.1.2, you have to add a new configuration property:

dubbo.config.multiple=true