apollo-core/src/main/java/com/ctrip/framework/foundation/internals/ServiceBootstrap.java/ServiceBootstrap/loadPrimary
class ServiceBootstrap:  public static <S extends Ordered> S loadPrimary(Class<S> clazz) {
    List<S> candidates = loadAllOrdered(clazz);

    if (candidates.isEmpty()) {
      throw new IllegalStateException(String.format(
          "No implementation defined in /META-INF/services/%s, please check whether the file exists and has the right implementation class!",
          clazz.getName()));
    }


    return candidates.get(0);
  }