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自动化配置 base-packages 错误导致 无法暴露服务 #226

Closed fengshi20102010 closed 5 years ago

fengshi20102010 commented 6 years ago

版本:dubbo-spring-boot-starter:0.2.0 ide:MyEclipse 2016

问题: 在application.yml配置 dubbo的时候,ide自动生成的扫描包路径为: dubbo:
scan: base-packages:

实际上通过properties注入的名字应该为dubbo.scan.basePackages,导致无法扫描到basePackages,故而没有暴露出服务。将base-packages 修改为 basePackages后 发现成功暴露出服务。yml看起来类似: dubbo:
scan: basePackages:

zyw commented 6 years ago

确实在yml下base-packages无法扫描暴露的服务,希望能修复该bug

gejun123456 commented 6 years ago

我已经提交了一个pull request 希望作者能合下 #233

itmyhome commented 6 years ago

同样遇到该问题,但是不明白为什么改成basePackages就能解决

mercyblitz commented 5 years ago

It's caused by the relaxed rules of Spring Boot 2.0 externalized configuration is changed. I will try to fix it in next release.

cherrythefatbunny commented 5 years ago

the serviceAnnotationBeanPostProcessor method in DubboAutoConfiguration will not be triggered when property dubbo.scan.base-packages is set.Try dubbo.scan.basePackages instead.