12345678910111213141516171819 |
- package routers
- import (
- "Medical_ERP/controllers"
- beego "github.com/beego/beego/v2/server/web"
- )
- func init() {
- // 分组
- spec := beego.NewNamespace("/api/spec",
- beego.NSRouter("/list", &controllers.SpecController{}, "*:List"),
- beego.NSRouter("/detail", &controllers.SpecController{}, "*:Detail"),
- beego.NSRouter("/add", &controllers.SpecController{}, "*:Add"),
- beego.NSRouter("/edit", &controllers.SpecController{}, "*:Edit"),
- beego.NSRouter("/delete", &controllers.SpecController{}, "*:Delete"),
- )
- //注册 namespace
- beego.AddNamespace(spec)
- }
|