网关V1,添加批量写
This commit is contained in:
10
gateway/config_loader.py
Normal file
10
gateway/config_loader.py
Normal file
@ -0,0 +1,10 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
def load_config(config_path="config/config.json"):
|
||||
"""加载配置文件"""
|
||||
if not os.path.exists(config_path):
|
||||
raise FileNotFoundError(f"Configuration file not found: {config_path}")
|
||||
|
||||
with open(config_path, "r") as f:
|
||||
return json.load(f)
|
||||
Reference in New Issue
Block a user