@ConditionalOnProperty(
name = {“dubbo.scan.basePackages”}
)
@ConditionalOnClass({ConfigurationPropertySources.class})
@bean
public ServiceAnnotationBeanPostProcessor serviceAnnotationBeanPostProcessor(Environment environment) {
Set packagesToScan = (Set)environment.getProperty(“dubbo.scan.basePackages”, Set.class, Collections.emptySet());
return new ServiceAnnotationBeanPostProcessor(packagesToScan);
}
但是在{
“sourceType”: “com.alibaba.boot.dubbo.autoconfigure.DubboScanProperties”,
“name”: “dubbo.scan.base-packages”,
【java|包扫描路径写成dubbo.scan.base-packages时,无法暴露服务】“description”: “The basePackages to scan , the multiple-value is delimited by comma @see EnableDubbo#scanBasePackages()”,
“type”: “java.util.Set”
}
造成自动提示dubbo.scan.base-packages 导致dubbo.scan.basePackages 获取不到,希望能及早更新一下吧,这个稍不留神就容易出错
推荐阅读
- Java教程合集
- Java远程方法调用(RMI)
- Java方法重载和方法重写的区别
- Java对象和类之间的区别
- Java文档注释(javadoc工具)
- Java命令行参数
- Java strictfp关键字
- Java中的值调用和引用调用
- 一款高颜值的 MySQL 管理工具,超好用。。