mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-08 08:50:25 +08:00
feat: 新增简易版ioc
This commit is contained in:
@@ -2,15 +2,17 @@ package router
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/sys/api"
|
||||
"mayfly-go/internal/sys/application"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/ioc"
|
||||
"mayfly-go/pkg/req"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitResourceRouter(router *gin.RouterGroup) {
|
||||
r := &api.Resource{ResourceApp: application.GetResourceApp()}
|
||||
rg := router.Group("sys/resources")
|
||||
r := new(api.Resource)
|
||||
biz.ErrIsNil(ioc.Inject(r))
|
||||
|
||||
reqs := [...]*req.Conf{
|
||||
req.NewGet("", r.GetAllResourceTree),
|
||||
|
||||
Reference in New Issue
Block a user