mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-08 17:40:24 +08:00
routes目录调整
This commit is contained in:
@@ -22,9 +22,10 @@ static目录:映射为`api/static/*`,通过`go:embed`嵌入到了二进制
|
||||
│ ├── middleware // 中间件
|
||||
│ ├── model // 数据库模型
|
||||
│ ├── util // 工具包
|
||||
│ ├── routers // 路由`api`,
|
||||
│ ├── resources // 验证码依赖文件,待调整
|
||||
│ ├── static // 静态文件,访问路由`/api/static/*`
|
||||
│ ├── router // 路由,
|
||||
│ ├── public
|
||||
│ │ ├──resources // 验证码等依赖文件
|
||||
│ │ ├──static // 静态文件,访问路由`/api/static/*`
|
||||
│ ├── main.go // 入口
|
||||
│ ├── .env // 配置文件,注意不提交git
|
||||
```
|
@@ -11,7 +11,7 @@ import (
|
||||
"x_admin/core"
|
||||
"x_admin/core/response"
|
||||
"x_admin/middleware"
|
||||
"x_admin/router"
|
||||
"x_admin/routes"
|
||||
|
||||
_ "x_admin/docs"
|
||||
|
||||
@@ -53,7 +53,7 @@ func initRouter() *gin.Engine {
|
||||
// 注册路由
|
||||
apiGroup := r.Group("/api")
|
||||
|
||||
router.RegisterRoute(apiGroup, r)
|
||||
routes.RegisterRoute(apiGroup, r)
|
||||
|
||||
return r
|
||||
}
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package router
|
||||
package routes
|
||||
|
||||
import (
|
||||
"x_admin/controller/admin_ctl/commonController"
|
||||
"x_admin/core/response"
|
||||
"x_admin/middleware"
|
||||
"x_admin/router/adminRoute"
|
||||
"x_admin/routes/adminRoute"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
@@ -279,3 +279,4 @@ defineExpose({
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user