public void stop() throws Exception {
        // stop registry
        if (serviceRegistry != null) {
            serviceRegistry.stop();
        }

        // stop callback
        if (stopCallbackList.size() > 0) {
            for (BaseCallback callback : stopCallbackList) {
                try {
                    callback.run();
                } catch (Exception e) {
                    logger.error(e.getMessage(), e);
                }
            }
        }

        // stop CallbackThreadPool
        stopCallbackThreadPool();
    }
xxl-rpc invoker factory, init service-registry

@author xuxueli 2018-10-19
larkmidtable-web/larkmt-rpc/src/main/java/com/larkmidtable/rpc/remoting/invoker/XxlRpcInvokerFactory.java