refactor: ioc与系统初始化处理方式调整

This commit is contained in:
meilin.huang
2024-01-22 11:35:28 +08:00
parent de5b9e46d3
commit 9efd20f1b9
26 changed files with 257 additions and 55 deletions

View File

@@ -10,6 +10,8 @@ import (
"net/http"
"time"
sysapp "mayfly-go/internal/sys/application"
"github.com/gin-gonic/gin"
)
@@ -24,7 +26,7 @@ func runWebServer(ctx context.Context) {
// 日志处理器
req.UseAfterHandlerInterceptor(req.LogHandler)
// 设置日志保存函数
req.SetSaveLogFunc(initialize.InitSaveLogFunc())
req.SetSaveLogFunc(sysapp.GetSyslogApp().SaveFromReq)
srv := http.Server{
Addr: config.Conf.Server.GetPort(),