From e9a4eb06298746820b4a759068b684bd3262c324 Mon Sep 17 00:00:00 2001 From: Kun-GitHub Date: Wed, 24 Dec 2025 15:44:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=B7=BB=E5=8A=A0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置API服务基础参数(主机、端口、超时等) - 设置跨域资源共享(CORS)配置 - 配置日志服务参数(控制台输出、路径、级别等) - 设置Redis连接参数(主机地址、数据库、密码) - 配置JWT访问密钥用于身份验证 - 设置国际化(I18n)目录配置 - 配置应用RPC服务连接参数(ETCD地址、超时时间等) - 设置ETCD注册中心连接信息 --- api/etc/test.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 api/etc/test.yaml diff --git a/api/etc/test.yaml b/api/etc/test.yaml new file mode 100644 index 0000000..079bc56 --- /dev/null +++ b/api/etc/test.yaml @@ -0,0 +1,49 @@ +Name: cms.api +Host: 0.0.0.0 +Port: 9902 +Timeout: 6000 +Middlewares: + Tenant: true + +CROSConf: + Address: '*' + +Log: + ServiceName: AppApiLogger + Mode: console + Path: /home/data/logs + Level: info + Compress: false + Encoding: json + KeepDays: 7 + StackCoolDownMillis: 100 + +RedisConf: + Host: 192.168.201.228:31314 + Db: 4 + Pass: 'redis.123456' + + +JWTConf: + AccessSecret: KdAj3ZnmHpVvGKBthWXmTNPRcdZaWP7cnbsvmJSYRadN8PebaaAQENVKDD6WCm + +I18nConf: + Dir: + +AppRpc: + #Target: 127.0.0.1:9101 + Etcd: + Hosts: + - mingyang-etcd-test-service.mingyang-admin.svc.cluster.local:2379 # 共享etcd地址 + Key: cms.rpc + Enabled: true + Timeout: 6000 + Keepalive: + Time: 10s + Timeout: 20s + PermitWithoutStream: true + +Etcd: + Hosts: + - mingyang-etcd-test-service.mingyang-admin.svc.cluster.local:2379 + Key: cms.api \ No newline at end of file