跳到主要内容
版本:Next

abstractWebControllerGenerator <Router>

Index

Properties

readonlyapp

readonlymidwayWebRouterService

midwayWebRouterService: MidwayWebRouterService

Methods

abstractcreateRouter

  • createRouter(routerOptions: any): Router

abstractgenerateController

publicgenerateKoaController

  • generateKoaController(routeInfo: RouterInfo): (ctx: any, next: any) => Promise<void>
  • wrap controller string to middleware function

publicloadMidwayController

  • loadMidwayController(routerHandler?: (newRouter: Router) => void): Promise<void>