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

dubbo的provider和comsumer属性配置不生效 #60

Closed foreveryang321 closed 6 years ago

foreveryang321 commented 6 years ago

dubbo-spring-boot-starter.0.1.0.jar

dubbo:
  application:
    name: demo
  protocol:
    name: dubbo
    port: 20881
  registry:
    address: zookeeper://localhost:2181
    client: curator
  provider:
    version: 1.0
    timeout: 20000
    retries: 0
  consumer:
    version: 1.0
    timeout: 20000
    retries: 0
    check: false

其中protocol.port,provider和consumer配置均不生效

不知道是否与PropertySourcesUtils类中只会把String类型的属性放到subProperties中有关? dubbo

数值通过加单引号(''),能够正确获取到值。 从这个看,数值类型,boolean值类型的配置都不会生效

levin950825 commented 6 years ago

我也被这问题困扰着

luffyke commented 6 years ago

Duplicated with #30

mercyblitz commented 6 years ago

Next release will resolve this issue

lovepoem commented 6 years ago

Now https://github.com/alibaba/dubbo/milestone/13 is released. dubbo 2.6.1 has fixed this bug

You can manually modify the Dubbo version to 2.6.1 first

foreveryang321 commented 6 years ago

OK, Thanks

foreveryang321 commented 6 years ago

dubbo-spring-boot-starter.0.2.0.jar dubbo.2.6.2.jar

application.yml

dubbo:
  consumer:
    check: false

调用ConfigUtils.replaceProperty(properties.getProperty(key, defaultValue), (Map) properties)读取配置时,返回 null,java.util.Properties.getProperty源码如下

image

liuyanghui commented 4 years ago

dubbo 2.7.5 也出现这个问题呢

wuyibo126 commented 4 years ago

dubbo 2.7.6 也有这个问题啊