基础架构变更 增加模块化
This commit is contained in:
@@ -25,32 +25,38 @@ func Routers() *gin.Engine {
|
||||
Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
global.GVA_LOG.Info("register swagger handler")
|
||||
// 方便统一添加路由组前缀 多服务器上线使用
|
||||
|
||||
//获取路由组实例
|
||||
systemRouter := router.RouterGroupApp.System
|
||||
exampleRouter := router.RouterGroupApp.Example
|
||||
autocodeRouter := router.RouterGroupApp.Autocode
|
||||
PublicGroup := Router.Group("")
|
||||
{
|
||||
router.RouterApp.System.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
||||
router.RouterApp.System.InitInitRouter(PublicGroup) // 自动初始化相关
|
||||
systemRouter.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
||||
systemRouter.InitInitRouter(PublicGroup) // 自动初始化相关
|
||||
}
|
||||
PrivateGroup := Router.Group("")
|
||||
PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
|
||||
{
|
||||
router.RouterApp.System.InitApiRouter(PrivateGroup) // 注册功能api路由
|
||||
router.RouterApp.System.InitJwtRouter(PrivateGroup) // jwt相关路由
|
||||
router.RouterApp.System.InitUserRouter(PrivateGroup) // 注册用户路由
|
||||
router.RouterApp.System.InitMenuRouter(PrivateGroup) // 注册menu路由
|
||||
router.RouterApp.System.InitEmailRouter(PrivateGroup) // 邮件相关路由
|
||||
router.RouterApp.System.InitSystemRouter(PrivateGroup) // system相关路由
|
||||
router.RouterApp.System.InitCasbinRouter(PrivateGroup) // 权限相关路由
|
||||
router.RouterApp.Example.InitCustomerRouter(PrivateGroup) // 客户路由
|
||||
router.RouterApp.System.InitAutoCodeRouter(PrivateGroup) // 创建自动化代码
|
||||
router.RouterApp.System.InitAuthorityRouter(PrivateGroup) // 注册角色路由
|
||||
router.RouterApp.Example.InitSimpleUploaderRouter(PrivateGroup) // 断点续传(插件版)
|
||||
router.RouterApp.System.InitSysDictionaryRouter(PrivateGroup) // 字典管理
|
||||
router.RouterApp.System.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
|
||||
router.RouterApp.System.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
|
||||
router.RouterApp.Example.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
||||
router.RouterApp.Example.InitExcelRouter(PrivateGroup) // 表格导入导出
|
||||
systemRouter.InitApiRouter(PrivateGroup) // 注册功能api路由
|
||||
systemRouter.InitJwtRouter(PrivateGroup) // jwt相关路由
|
||||
systemRouter.InitUserRouter(PrivateGroup) // 注册用户路由
|
||||
systemRouter.InitMenuRouter(PrivateGroup) // 注册menu路由
|
||||
systemRouter.InitEmailRouter(PrivateGroup) // 邮件相关路由
|
||||
systemRouter.InitSystemRouter(PrivateGroup) // system相关路由
|
||||
systemRouter.InitCasbinRouter(PrivateGroup) // 权限相关路由
|
||||
systemRouter.InitAutoCodeRouter(PrivateGroup) // 创建自动化代码
|
||||
systemRouter.InitAuthorityRouter(PrivateGroup) // 注册角色路由
|
||||
systemRouter.InitSysDictionaryRouter(PrivateGroup) // 字典管理
|
||||
systemRouter.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
|
||||
systemRouter.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
|
||||
exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
||||
exampleRouter.InitExcelRouter(PrivateGroup) // 表格导入导出
|
||||
exampleRouter.InitSimpleUploaderRouter(PrivateGroup) // 断点续传(插件版)
|
||||
exampleRouter.InitCustomerRouter(PrivateGroup) // 客户路由
|
||||
|
||||
// Code generated by gin-vue-admin Begin; DO NOT EDIT.
|
||||
autocodeRouter.InitSysAutoCodeExampleRouter(PrivateGroup)
|
||||
// Code generated by gin-vue-admin End; DO NOT EDIT.
|
||||
}
|
||||
global.GVA_LOG.Info("router register success")
|
||||
|
Reference in New Issue
Block a user