1. 实现配置文件解析

2. 实现数据库连接
This commit is contained in:
2025-09-07 17:50:04 +08:00
parent b8229846d1
commit cf00a74008
365 changed files with 181226 additions and 0 deletions

19
config.yml Normal file
View File

@@ -0,0 +1,19 @@
# 应用配置文件
server:
# Web服务器监听IP
host: "0.0.0.0"
# Web服务器监听端口
port: 8086
# PostgreSQL数据库配置
database:
host: "huangwc.com"
port: 5432
username: "pig-farm-controller"
password: "pig-farm-controller"
dbname: "pig-farm-controller"
sslmode: "disable"
# 连接池配置
max_open_conns: 5
max_idle_conns: 5
conn_max_lifetime: 300 # 5分钟