mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
优化功能,通知功能,任务功能
This commit is contained in:
9
main.go
9
main.go
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"pandax/apps/job/jobs"
|
||||
"pandax/base/config"
|
||||
"pandax/base/ctx"
|
||||
"pandax/base/global"
|
||||
@@ -12,8 +13,16 @@ import (
|
||||
func main() {
|
||||
global.Db = starter.GormInit(config.Conf.Server.DbType)
|
||||
initialize.InitTable()
|
||||
// gin后置 函数
|
||||
ctx.UseAfterHandlerInterceptor(middleware.OperationHandler)
|
||||
// gin前置 函数
|
||||
ctx.UseBeforeHandlerInterceptor(ctx.PermissionHandler)
|
||||
// gin后置 函数
|
||||
ctx.UseAfterHandlerInterceptor(ctx.LogHandler)
|
||||
go func() {
|
||||
// 启动系统调度任务
|
||||
jobs.InitJob()
|
||||
jobs.Setup()
|
||||
}()
|
||||
starter.RunWebServer(initialize.InitRouter())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user