code: function _preloadRoute(json, router, controllers) {
    let _path = json.path;
    let method = json.method || 'get';
    let controller = json.controller;
  
    method = router[method] || router[method.toLowerCase()];
    if (!method) {
      throw new Error(`Could not find a method with "${method}" on router`);
    }
    if (!controller) {
      throw new Error(`The controller is empty for route "${_path}"`);
    }
    if (!Array.isArray(controller)) {
      controller = [controller];
    }
  
    // 将字符串转换为真实的controller函数
    controller = controller.map((n) => {
      let fn = typeof n === 'function' ? n : get(controllers, n);
      if (typeof fn !== 'function') {
        throw new Error(`Could not find "${n}" as controller for route "${_path}"`);
      }
      return fn;
    });
  
    // 如果配置了path参数，将中间价挂载至该路由下，即：router.get(path, middleware)
    if (_path) {
      controller.unshift(_path);
    }
    if (Array.isArray(controller)) {
      method.apply(router, controller);
    }
  }
docs: 挂载路由
  @param {Object} json 单条路由规则对应的配置
  @param {koa-router|express.Router} router 路由挂在对象
  @param {Object} controllers controller集合