You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
363 B

2 months ago
package handlers
import (
2 months ago
"ginCms/handlers/common"
2 months ago
"ginCms/handlers/role"
2 months ago
"ginCms/handlers/system"
"github.com/gin-gonic/gin"
)
// 初始化路由引擎
func InitEngine() *gin.Engine {
// 1. 初始化路由引擎
r := gin.Default()
2 months ago
// 设置中间件
common.UseCors(r)
2 months ago
// 2. 注册不同模块的路由
system.Router(r)
2 months ago
role.Router(r)
2 months ago
return r
}