wangkaiyue 3 роки тому
батько
коміт
26a612f0ee
2 змінених файлів з 93 додано та 7 видалено
  1. 7 7
      etc/config.yaml
  2. 86 0
      etc/config_local.yaml

+ 7 - 7
etc/config.yaml

@@ -1,7 +1,7 @@
 # 代理网关服务配置
 server:
   # 基本配置
-  address: :8080                          # 本地监听地址。默认":80"
+  address: :8077                          # 本地监听地址。默认":80"
   readTimeout: 60s                        # 请求读取超时时间,一般不需要配置。默认为60秒
   maxHeaderBytes: 10240                   # 请求Header大小限制(Byte)。默认为10KB
   serverAgent: jianyu Gateway             # 服务端Agent信息。默认为"GF HTTP Server"
@@ -23,17 +23,17 @@ etcd:
     userCenter:
       key: usercenter.rpc
       address:
-        - 127.0.0.1:23792
+        - 192.168.3.240:2379
     # 资源中台配置
     resourceCenter:
       key: resource.rpc
       address:
-        - 127.0.0.1:23791
+        - 192.168.3.240:2379
 
 #数据库配置
 databases:
   # redis配置
-  redis: session=123.56.53.97:1713,other=123.56.53.97:1713    # 用户获取剑鱼程序用户session
+  redis: session=192.168.3.206:1712    # 用户获取剑鱼程序用户session
 
   # mysql配置
   mysql:
@@ -49,7 +49,7 @@ databases:
 system:
   # 监听服务注册etcd配置
   etcdListen:
-    - 127.0.0.1:2379
+    - 192.168.3.240:2379
 
   response:
     head-clear: # 响应头删除
@@ -63,10 +63,10 @@ system:
     debug: true                                 # 是否打印调试信息。默认false
     stdout: true                                # 是否输出到控制台。默认false
     systemLogPattern: system-{Ymd}.log          # 日志文件格式。默认为"system-{Ymd}.log"
-    serverErrorStack: false                     # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
+    serverErrorStack: true                      # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
     serverErrorLogEnabled: true                 # 是否记录异常日志信息到日志中。默认为true
     serverErrorLogPattern: error-{Ymd}.log      # 异常错误日志文件格式。默认为"error-{Ymd}.log"
-    serverAccessLogEnabled: false               # 是否记录访问日志。默认为false
+    serverAccessLogEnabled: true                # 是否记录访问日志。默认为false
     serverAccessLogPattern: access-{Ymd}.log    # 访问日志文件格式。默认为"access-{Ymd}.log"
     serverRequestTimeout: 2000                  # 接口请求超时通知,若注册表中无配置超时提醒使用此配置。默认500毫秒
 

+ 86 - 0
etc/config_local.yaml

@@ -0,0 +1,86 @@
+# 代理网关服务配置
+server:
+  # 基本配置
+  address: :8080                          # 本地监听地址。默认":80"
+  readTimeout: 60s                        # 请求读取超时时间,一般不需要配置。默认为60秒
+  maxHeaderBytes: 10240                   # 请求Header大小限制(Byte)。默认为10KB
+  serverAgent: jianyu Gateway             # 服务端Agent信息。默认为"GF HTTP Server"
+
+  # 其他配置
+  sessionCookieOutput: false        # 关闭session及返回cookie,是否将SessionId返回到Cookie中。默认true
+  clientMaxBodySize: 810241024      # 客户端最大Body上传限制大小,影响文件上传大小(Byte)。默认为8*1024*1024=8MB
+  formParsingMemory: 1048576        # 解析表单时的缓冲区大小(Byte),一般不需要配置。默认为1024*1024=1MB
+  dumpRouterMap: false              # 是否在Server启动时打印所有的路由列表。默认为true
+  graceful: true                    # 是否开启平滑重启特性,开启时将会在本地增加10000的本地TCP端口用于进程间通信。默认false
+  gracefulTimeout: 10               # 平滑重启父进程最大存活时间。默认2秒
+
+# 基础服务ETCD配置
+etcd:
+  # 基础服务
+  baseserver:
+    appid: 10000
+    # 用户中台配置
+    userCenter:
+      key: usercenter.rpc
+      address:
+        - 127.0.0.1:23792
+    # 资源中台配置
+    resourceCenter:
+      key: resource.rpc
+      address:
+        - 127.0.0.1:23791
+
+#数据库配置
+databases:
+  # redis配置
+  redis: session=123.56.53.97:1713,other=123.56.53.97:1713    # 用户获取剑鱼程序用户session
+
+  # mysql配置
+  mysql:
+    dbName: base_service
+    address: 192.168.3.11:3366
+    userName: root
+    passWord: Topnet123
+    maxOpenConns: 5
+    maxIdleConns: 5
+
+
+# 系统配置
+system:
+  # 监听服务注册etcd配置
+  etcdListen:
+    - 127.0.0.1:2379
+
+  response:
+    head-clear: # 响应头删除
+      - Trace-Id
+      - deductNum
+      - deductIds
+
+  # 系统日志
+  log:
+    path: ./logs                                # 系统日志默认文件默认报错路径。默认为./logs
+    debug: true                                 # 是否打印调试信息。默认false
+    stdout: true                                # 是否输出到控制台。默认false
+    systemLogPattern: system-{Ymd}.log          # 日志文件格式。默认为"system-{Ymd}.log"
+    serverErrorStack: false                     # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
+    serverErrorLogEnabled: true                 # 是否记录异常日志信息到日志中。默认为true
+    serverErrorLogPattern: error-{Ymd}.log      # 异常错误日志文件格式。默认为"error-{Ymd}.log"
+    serverAccessLogEnabled: false               # 是否记录访问日志。默认为false
+    serverAccessLogPattern: access-{Ymd}.log    # 访问日志文件格式。默认为"access-{Ymd}.log"
+    serverRequestTimeout: 2000                  # 接口请求超时通知,若注册表中无配置超时提醒使用此配置。默认500毫秒
+
+  # 系统告警
+  alarm:
+    isOpen: true                        # 异常通知开关。默认关闭
+    address: 192.168.3.207:4150         # nsq消息通知地址。默认关闭
+    toppic: jyalert                     # 消息管道
+    isJsonEncode: false                 # 是否加密
+    id: pre_alert                       # id
+    title: 你有新的告警消息处理            # 消息标题
+    text: 前置代理告警请查看               # 消息正文
+
+
+
+
+