You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "WangziwenUnique (GitHub)" <gi...@apache.org> on 2018/09/29 09:18:26 UTC

[GitHub] [incubator-dubbo] WangziwenUnique opened issue #2585: 设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释

- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) 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](https://user-images.githubusercontent.com/20470232/46243870-01e0e380-c40b-11e8-88f4-8e07ab4a4079.png)
![image](https://user-images.githubusercontent.com/20470232/46243934-aa8f4300-c40b-11e8-9cc0-9349eada7a3f.png)

### Expected Result

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

### Actual Result

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

![image](https://user-images.githubusercontent.com/20470232/46243908-48364280-c40b-11e8-928a-46e138a7648c.png)

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

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

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2585 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] WangziwenUnique commented on issue #2585: 设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释

Posted by "WangziwenUnique (GitHub)" <gi...@apache.org>.
未发现全局Protocol如何配置,spring-configuration-metadata.json中提供的配置中,也未发现soureType对应的类 MultipleDubboConfigBindingProperties。
![image](https://user-images.githubusercontent.com/20470232/46244736-fb0b9e00-c415-11e8-87c5-3979fa74832a.png)

只能暂时采用替代方案,为所有Providers统一配置Protocols,缺点无法为个别接口指定对外协议
![image](https://user-images.githubusercontent.com/20470232/46244723-d8798500-c415-11e8-8c1d-c961888a8674.png)
![image](https://user-images.githubusercontent.com/20470232/46244724-ddd6cf80-c415-11e8-8fdd-8dea9a6d75b8.png)



[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2585 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] mercyblitz commented on issue #2585: 设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
`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: 
```properties
dubbo.config.multiple=true
```

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2585 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] WangziwenUnique commented on issue #2585: 设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释

Posted by "WangziwenUnique (GitHub)" <gi...@apache.org>.
![image](https://user-images.githubusercontent.com/20470232/46244649-86842f80-c414-11e8-86d0-4d9c72f4db8b.png)
全局设置的方式未发现注入方式,暂时直接统一配置生产者。缺点无法单独指定协议

![image](https://user-images.githubusercontent.com/20470232/46244697-7a4ca200-c415-11e8-9e07-2b21663b48be.png)


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2585 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] beiwei30 commented on issue #2585: 设置protocols属性,然而bean并未注入。设置protocol时可以注释。怎么解释

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
this issue should have been addressed by @mercyblitz. 

@mercyblitz would you mind to confirm?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2585 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org