Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DubboBootstrap 的 ready/startup 默认值为什么是 true? #8099

Closed
2 tasks done
abel533 opened this issue Jun 19, 2021 · 2 comments
Closed
2 tasks done

DubboBootstrap 的 ready/startup 默认值为什么是 true? #8099

abel533 opened this issue Jun 19, 2021 · 2 comments

Comments

@abel533
Copy link

abel533 commented Jun 19, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.8+
  • Operating System version: Windows10
  • Java version: Jdk11

Code

最近在解决 spring cloud alibaba 和 nacos 的问题。

实现了一个和 alibaba/spring-cloud-alibaba#1805 不一样的方案,在 nacos 注册时先判断 DubboBootstrap.isReady(),只有等 ready 后才去注册服务。

现在看了源码发现一个是字段名和方法都改了。。另一个就是默认值还是 true

问题

  1. 从改动来看这个类是不是不希望在 dubbo 第三方扩展中使用?(接口改动随意)
  2. 这个默认值为什么不设置为 false?(这样在使用的时候可以直接判断是否已经启动)
@abel533
Copy link
Author

abel533 commented Jun 19, 2021

目前使用的 2.7.8 版本,如果能升级到 2.7.9,就能直接使用下面事件更方便的解决。

@AlbumenJ
Copy link
Member

默认 true 是为了兼容 API 方式使用,直接使用 API 方式的不会触发 DubboBootstrap 初始化。

@abel533 abel533 closed this as completed Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants