dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

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

Open WesleyZiwen opened this issue 8 years ago • 3 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.
  • [x] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 0.2.0
  • Operating System version: mac
  • Java version: 1.8

Steps to reproduce this issue

image image

Expected Result

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

Actual Result

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

image

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

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

WesleyZiwen avatar Sep 29 '18 09:09 WesleyZiwen

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

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

WesleyZiwen avatar Sep 29 '18 10:09 WesleyZiwen

this issue should have been addressed by @mercyblitz.

@mercyblitz would you mind to confirm?

beiwei30 avatar Feb 11 '19 09:02 beiwei30

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

mercyblitz avatar Feb 12 '19 01:02 mercyblitz