config_local.yaml 3.5 KB

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