| | |
| | | |
| | | import ( |
| | | "net/http" |
| | | "srm/middleware" |
| | | "srm/router/purchase" |
| | | |
| | | "github.com/gin-gonic/gin" |
| | |
| | | global.GVA_LOG.Info("register swagger handler") |
| | | // 方便统一添加路由组前缀 多服务器上线使用 |
| | | |
| | | PublicGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix) |
| | | PrivateGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix) |
| | | { |
| | | // 健康监测 |
| | | PublicGroup.GET("/health", func(c *gin.Context) { |
| | | PrivateGroup.GET("/health", func(c *gin.Context) { |
| | | c.JSON(http.StatusOK, "ok") |
| | | }) |
| | | //systemRouter.InitInitRouter(PublicGroup) // 自动初始化相关 |
| | | } |
| | | |
| | | PrivateGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix) |
| | | PrivateGroup.Use(middleware.JWTAuth()) |
| | | { |
| | | systemRouter.InitSystemRouter(PrivateGroup) // system相关路由 |
| | | //exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由 |