From 11b467bd56294624c465608a1df6f4d6847c8972 Mon Sep 17 00:00:00 2001 From: zhouwentao Date: Fri, 2 Jan 2026 18:29:51 +0800 Subject: [PATCH] 1 --- server/config/config.dev.yaml | 2 +- server/main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/config/config.dev.yaml b/server/config/config.dev.yaml index 772ba6a..68f80f0 100644 --- a/server/config/config.dev.yaml +++ b/server/config/config.dev.yaml @@ -1,5 +1,5 @@ server: - port: 8080 + port: 8081 log: level: debug diff --git a/server/main.go b/server/main.go index 87b399b..4936a7e 100644 --- a/server/main.go +++ b/server/main.go @@ -103,9 +103,9 @@ func main() { // 启动服务器 go func() { - common.Info("服务器启动: http://localhost:8080") - common.Info("Swagger文档: http://localhost:8080/swagger/index.html") - log.Println("服务器启动: http://localhost:8080") + common.Info("服务器启动: http://localhost:%d", port) + common.Info("Swagger文档: http://localhost:%d/swagger/index.html", port) + log.Printf("服务器启动: http://localhost:%d\n", port) if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed { common.LogError("启动失败: %s", err) log.Fatalf("启动失败: %s\n", err)