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

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