apollo-common/src/main/java/com/ctrip/framework/apollo/common/utils/BeanUtils.java/BeanUtils/mapByKey
class BeanUtils:  @SuppressWarnings("unchecked")
  public static <K, V> Map<K, V> mapByKey(String key, List<?> list) {
    Map<K, V> map = new HashMap<>();
    if (CollectionUtils.isEmpty(list)) {
      return map;
    }
    try {
      Class<?> clazz = list.get(0).getClass();
      Field field = deepFindField(clazz, key);
      if (field == null) {
          throw new IllegalArgumentException("Could not find the key");
      }
      field.setAccessible(true);
      for (Object o : list) {
        map.put((K) field.get(o), (V) o);
      }
    } catch (Exception e) {
      throw new BeanUtilsException(e);
    }
    return map;
  }