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)