Dubbo启动时检查

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/nangeali/article/details/82470258

启动时检查

Dubbo缺省,会在启动时
检查依赖的服务是否可用

不可用时会抛出异常,阻止 Spring 初始化完成
以便上线时,能及早发现问题,默认 check=”true”

可以配置

关闭某个服务的启动时检查

<dubbo:reference interface="com.foo.BarService" check="false" />

关闭所有服务的启动时检查

<dubbo:consumer check="false" />

关闭注册中心启动时检查

<dubbo:registry check="false" />

通过全局配置文件配置
Dubbo.properties

dubbo.reference.com.foo.BarService.check=false
dubbo.reference.check=false
dubbo.consumer.check=false
dubbo.registry.check=false

猜你喜欢

转载自blog.csdn.net/nangeali/article/details/82470258