perf👌 调整应用中间件

This commit is contained in:
zhangwenjian
2021-05-31 23:52:56 +08:00
parent b1d3924294
commit f31d1a137f
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
package router
import (
"github.com/go-admin-team/go-admin-core/sdk/pkg"
"os"
"github.com/gin-gonic/gin"
@@ -25,9 +26,9 @@ func InitRouter() {
os.Exit(-1)
}
//r.Use(common.Sentinel()).
// Use(common.RequestId(pkg.TrafficKey))
//common.InitMiddleware(r)
r.Use(common.Sentinel()).
Use(common.RequestId(pkg.TrafficKey))
common.InitMiddleware(r)
// the jwt middleware
authMiddleware, err := common.AuthInit()
if err != nil {