code: public static ProviderInfo convertProviderToProviderInfo(ProviderConfig config, ServerConfig server) {
          ProviderInfo providerInfo = new ProviderInfo()
              .setPort(server.getPort())
              .setWeight(config.getWeight())
              .setSerializationType(config.getSerialization())
              .setProtocolType(server.getProtocol())
              .setPath(server.getContextPath());
          String host = server.getHost();
          if (NetUtils.isLocalHost(host) || NetUtils.isAnyHost(host)) {
              host = SystemInfo.getLocalHost();
          }
          providerInfo.setHost(host);
          return providerInfo;
      }
docs: 转为服务端提供者对象
  
  @param config 服务提供者配置
  @param server 服务端
  @return 本地服务提供者对象