注册依赖配置

Config方法就是专门用于注入需要依赖的配置类的

goft.Ignite().
    Config(configuration.NewDBConfig(),configuration.NewServiceConfig()).
    Config(configuration.NewTestConfig()).
    Attach(middlewares.NewAddVersion()). //全局中间件
    Mount("",controllers.NewIndexController(),
      controllers.NewUserController(),
      ).
   Launch()

最后更新于