apache / dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
5.41k stars 1.88k forks source link

@Reference 的参数 url 可以解析自定义的变量吗 #215

Closed dungang closed 5 years ago

dungang commented 6 years ago

@Reference( version = "1.0.0", application = "${dubbo.application.id}", url="${dubbo.service.id-service-url}") dubbo.service.id-service-url 这个配置官方是不支持的,所以想自己配置,不知道是否支持 开发测试的时候无法直连到集群的服务,所以想通过配置,测试的指定url,发布的时候不配置url,而不是修改java代码

lipanpan commented 6 years ago

同问

mercyblitz commented 6 years ago

It works on current version

mercyblitz commented 5 years ago

Please add Dubbo 2.6.5 in order to override indirectly dependencies:

<dependency>
    <groupId>com.alibaba.boot</groupId>
    <artifactId>dubbo-spring-boot-starter</artifactId>
    <version>0.2.0</version>
</dependency>

<!-- Dubbo -->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo</artifactId>
    <version>2.6.5</version>
</dependency>
<!-- Spring Context Extras -->
<dependency>
    <groupId>com.alibaba.spring</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>1.0.2</version>
</dependency>

There was a legacy issue in Dubbo.