dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chickenlj (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] chickenlj opened issue #3039: Should make annotation easier to use for multiple items circumstance.
Date Fri, 21 Dec 2018 07:21:56 GMT
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


Mime
View raw message