You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (GitHub)" <gi...@apache.org> on 2018/12/21 07:21:56 UTC
[GitHub] [incubator-dubbo] chickenlj opened issue #3039: Should make
annotation easier to use for multiple items circumstance.
By default, annotation does not support reading of multi-items for one config type, for example:
```properties
dubbo.application.name=demo-provider
dubbo.registries.registry1.id=aaa
dubbo.registries.registry1.address=zookeeper://127.0.0.1:2181
dubbo.registries.registry2.id=bbb
dubbo.registries.registry2.address=zookeeper://127.0.0.1:2181
```
We can open multi config support by add the following annotation
`@EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.annotation.action", multipleConfig = true)`
```java
@Configuration
@EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.annotation.action", multipleConfig = true)
@PropertySource("classpath:/spring/dubbo-consumer.properties")
@ComponentScan(value = {"org.apache.dubbo.samples.annotation.action"})
static public class ConsumerConfiguration {}
```
Now, the `dubbo.registries.` works fine, but here comes a new problem, `dubbo.application.` can not work with `multiConfig=true`. To make it work, we must change it to `dubbo.applications.id1.name=demo-provider`.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3039 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] mercyblitz commented on issue #3039:
Should make annotation easier to use in multiple items circumstance.
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
To merge 2.6.6 implementation, trace this issue:
https://github.com/apache/incubator-dubbo/issues/3193
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3039 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] mercyblitz closed issue #3039: Should make
annotation easier to use in multiple items circumstance.
Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
[ issue closed by mercyblitz ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3039 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org