Dubbo缺省会在启动时检查依赖的服务是否可用,不可用时会抛出异常,阻止Spring初始化完成,以便上线时,能及早发现问题,默认check=true。
通过check="false"关闭检查,比如,测试时,有些服务不关心,或者出现了循环依赖,必须有一方先启动。
关闭某个服务的启动时检查
<dubbo:reference interface="com.foo.BarService" check="false" />
关闭所有服务的启动时检查
<dubbo:consumer check="false" />
关闭注册中心启动时检查
<dubbo:registry check="false" />