code: private static void loadCustom(String fileName) throws IOException {
          ClassLoader classLoader = ClassLoaderUtils.getClassLoader(RpcConfigs.class);
          Enumeration<URL> urls = classLoader != null ? classLoader.getResources(fileName)
              : ClassLoader.getSystemResources(fileName);
          if (urls != null) { // 可能存在多个文件
              List<CfgFile> allFile = new ArrayList<CfgFile>();
              while (urls.hasMoreElements()) {
                  // 读取每一个文件
                  URL url = urls.nextElement();
                  InputStreamReader input = null;
                  BufferedReader reader = null;
                  try {
                      input = new InputStreamReader(url.openStream(), "utf-8");
                      reader = new BufferedReader(input);
                      StringBuilder context = new StringBuilder();
                      String line;
                      while ((line = reader.readLine()) != null) {
                          context.append(line).append("\n");
                      }
                      Map map = JSON.parseObject(context.toString(), Map.class);
                      Integer order = (Integer) map.get(RpcOptions.RPC_CFG_ORDER);
                      allFile.add(new CfgFile(url, order == null ? 0 : order, map));
                  } finally {
                      if (reader != null) {
                          reader.close();
                      }
                      if (input != null) {
                          input.close();
                      }
                  }
              }
              Collections.sort(allFile, new OrderedComparator<CfgFile>()); // 从小到大排下序
              for (CfgFile file : allFile) {
                  CFG.putAll(file.getMap()); // 顺序加载，越大越后加载
              }
          }
      }
docs: 加载自定义配置文件
  
  @param fileName 文件名
  @throws IOException 加载异常