@Override
    public void register(ProviderConfig config) {
        String appName = config.getAppName();
        if (!registryConfig.isRegister()) {
            if (LOGGER.isInfoEnabled(appName)) {
                LOGGER.infoWithApp(appName, LogCodes.getLog(LogCodes.INFO_REGISTRY_IGNORE));
            }
            return;
        }

        if (config.isRegister()) {
            // register server
            try {
                List<Instance> instances = NacosRegistryHelper.convertProviderToInstances(config);
                if (CommonUtils.isNotEmpty(instances)) {
                    for (Instance instance : instances) {
                        String serviceName = instance.getServiceName();
                        if (LOGGER.isInfoEnabled(appName)) {
                            LOGGER.infoWithApp(appName,
                                LogCodes.getLog(LogCodes.INFO_ROUTE_REGISTRY_PUB_START, serviceName));
                        }
                        namingService.registerInstance(serviceName, instance);
                        if (LOGGER.isInfoEnabled(appName)) {
                            LOGGER.infoWithApp(appName,
                                LogCodes.getLog(LogCodes.INFO_ROUTE_REGISTRY_PUB_OVER, serviceName));
                        }
                    }
                    providerInstances.put(config, instances);
                }
            } catch (SofaRpcRuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new SofaRpcRuntimeException(LogCodes.getLog(LogCodes.ERROR_REG_PROVIDER, "NacosRegistry",
                    config.buildKey()), e);
            }
        }
    }
Instantiates a new Nacos registry.

@param registryConfig the registry config
registry/registry-nacos/src/main/java/com/alipay/sofa/rpc/registry/nacos/NacosRegistry.java