目录
一、概述
上一篇文章中对Dubbo的ServiceBean初始化checkAndUpdateSubConfigs方法做了简单的源码跟踪分析。它会startConfigCenter,prepareEnvironment,getDynamicConfiguration,进而启动zookeeper客户端,连接至zookeeper。
https://blog.csdn.net/qq_33513250/article/details/102780158
下面我们回到ServiceConfig类中的doExport方法,分析具体导出逻辑。
二、doExport
这是一个synchronized同步方法,判断是否已经导出或者销毁,然后调用doExportUrls方法
protected synchronized void doExport() {
if (unexported) {
throw new IllegalStateException("The service " + interfaceClass.getName() + " has already unexported!");