Skip to content

Commit

Permalink
Merge pull request #1559 from tesun/main
Browse files Browse the repository at this point in the history
发布模式时,gin不再输出路由log
  • Loading branch information
奇淼(piexlmax authored Oct 10, 2023
2 parents a83fa60 + 79dc8ad commit 2902f73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/initialize/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ import (
// 初始化总路由

func Routers() *gin.Engine {
Router := gin.Default()

// 设置为发布模式
if global.GVA_CONFIG.System.Env == "public" {
gin.SetMode(gin.ReleaseMode) //DebugMode ReleaseMode TestMode
}
Router := gin.New()

InstallPlugin(Router) // 安装插件
systemRouter := router.RouterGroupApp.System
exampleRouter := router.RouterGroupApp.Example
Expand Down

0 comments on commit 2902f73

Please sign in to comment.