From 1e2d7696d3b73ef639bf54d8d6e318197f574cb2 Mon Sep 17 00:00:00 2001 From: LoveLosita <2810873701@qq.com> Date: Mon, 2 Mar 2026 15:35:32 +0800 Subject: [PATCH] =?UTF-8?q?Version:=200.4.0.dev.260302.hotfix2=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86git=E6=B2=A1=E8=BF=BD=E8=B8=AA=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +-- backend/config.example.yaml | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 backend/config.example.yaml diff --git a/.gitignore b/.gitignore index 4e0141a..fee03ce 100644 --- a/.gitignore +++ b/.gitignore @@ -12,8 +12,7 @@ # 3. 配置文件与敏感信息 (Security & Configs) # 绝对不要提交包含数据库密码和 Kafka 地址的配置文件 .env -*.yaml -!config.example.yaml # 可以提交示例配置文件,供其他开发者参考 +backend/config.yaml # 4. 临时文件与日志 (Logs & Temp) *.log diff --git a/backend/config.example.yaml b/backend/config.example.yaml new file mode 100644 index 0000000..7182fa5 --- /dev/null +++ b/backend/config.example.yaml @@ -0,0 +1,39 @@ +# 应用配置文件示例 +# 包含服务器、数据库等基础配置 +# 请根据实际情况修改并保存为 config.yaml + +server: + port: 8080 + mode: debug + timeout: 30s + +database: + host: localhost + port: 3306 + user: smartflow_user + password: "put_your_database_password_here" + dbname: "put_your_database_name_here" + charset: utf8mb4 + parseTime: true + loc: Local + +jwt: + accessSecret: "put_your_jwt_access_secret_here" + refreshSecret: "put_your_jwt_refresh_secret_here" + accessTokenExpire: 15min + refreshTokenExpire: 7d + +log: + level: info + path: logs/ + +redis: + host: localhost + port: 6379 + password: "" + db: 0 + +time: + zone: "Asia/Shanghai" + semesterStartDate: "2026-03-02" #学期开始日期,一定要设定为周一,以便于计算周数 + semesterEndDate: "2026-07-19" #学期结束日期,一定要设定为周日,确保最后一周完整 \ No newline at end of file