liujiandao
2023-11-22 3b474a056ea35196ce5d2a5f297eafa11295a95d
initialize/router.go
@@ -2,6 +2,7 @@
import (
   "net/http"
   "srm/middleware"
   "srm/router/purchase"
   "github.com/gin-gonic/gin"
@@ -25,16 +26,15 @@
   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) // 文件上传下载功能路由