Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should make annotation easier to use in multiple items circumstance. #3039

Closed
chickenlj opened this issue Dec 21, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@chickenlj
Copy link
Contributor

By default, annotation does not support reading of multi-items for one config type, for example:

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)

   @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.

@chickenlj chickenlj added this to the 2.6.6 milestone Dec 21, 2018
@chickenlj chickenlj changed the title Should make annotation easier to use for multiple items circumstance. Should make annotation easier to use in multiple items circumstance. Dec 22, 2018
@chickenlj chickenlj modified the milestones: 2.6.6, 2.7.0, 2.7.1 Jan 15, 2019
@mercyblitz
Copy link
Contributor

To merge 2.6.6 implementation, trace this issue:

#3193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants