server:
  # 基本配置
  address: :8077                          # 本地监听地址。默认":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:
        - 192.168.3.149:2379
    # 资源中台配置
    resourceCenter:
      key: resource.rpc
      address:
        - 192.168.3.149:2379
    # 权益中台配置
    powerCheckCenter:
      key: powercheck.rpc
      address:
        - 192.168.3.149:2379

#数据库配置
databases:
  # redis配置
  redis: session=192.168.3.11:1713,other=192.168.3.11:1712 # session用户获取剑鱼程序用户session  other用户获取剑鱼权益redis
  polyredis:
    address: 192.168.3.11:1713
    poolsize: 30

  # mysql配置
  mysql:
    dbName: base_service
    address: 192.168.3.217:4000
    userName: root
    passWord: =PDT49#80Z!RVv52_z
    maxOpenConns: 5
    maxIdleConns: 5
  # jianyu mysql配置
  mysqlJy:
    dbName: jianyu
    address: 192.168.3.149:3306
    userName: root
    passWord: Topnet123
    maxOpenConns: 5
    maxIdleConns: 5

  # jianyu mongo配置
  mogJy:
    address: 192.168.3.206:27080
    size: 5
    dbName: qfw
    replSet:

# 系统配置
system:
  # 监听服务注册etcd配置
  etcdListen:
    - 127.0.0.1:2379

  response:
    head-clear: # 响应头删除
      - Trace-Id
      - deductNum
      - deductIds

proxy:
  timeout: 30                 # 连接超时。默认30秒
  keepAlive: 60               # 长链接超时。默认60秒
  maxIdleConns: 120           # 最大空闲连接 0没有限制。默认120
  idleConnTimeout: 90         # 空闲超时时间。默认90秒
  tLSHandshakeTimeout: 1      # tls握手超时时间。默认1秒
  expectContinueTimeout: 1    # 100-continue 超时时间。默认1秒
  maxIdleConnsPerHost: 5      # 客户端可以持有的最大空闲连接。默认5

jaeger:
  name: "gateway"
  address: "192.168.3.71:6831"

# 系统告警
alarm:
  isOpen: true                        # 异常通知开关。默���关闭
  address: 192.168.3.207:4150         # nsq消息通知地址。默认关闭
  toppic: jyalert                     # 消息管道
  isJsonEncode: false                 # 是否加密
  id: pre_alert                       # id
  title: 你有新的告警消息处理            # 消息标题
  text: 前置代理告警请查看               # 消息正文

outServer:
  sussbi:
    addr: http://192.168.3.11:8012
    user: jianyuweb
    password: 111111
    singlePointUrl: "^/succbi/(crm_system|yyssjdz)"
    paramReplace:
      "/succbi/api/meta/services/convertFileToPDF/*":
        replace:
          QUERY_PARAM_M_POSITION_ID: "jyUserPositionId"
          position_id: "jyUserPositionId"
          QUERY_PARAM_COMPANY_ID: "jyEntId"
          company_id: "jyEntId"
      "/succbi/api/dw/services/downloadAttachment":
        match:
          params.jyUserPositionId: "jyUserPositionId"
          params.jyEntId: "jyEntId"
      "/succbi/api/dw/services/getDwAttachments":
        match:
          params.jyUserPositionId: "jyUserPositionId"
          params.jyEntId: "jyEntId"
      "/succbi/nzbg/app/nzbg.app/word_nzbg/nzbg_word.d.docx":
        replace:
          QUERY_PARAM_M_POSITION_ID: "jyUserPositionId"
          position_id: "jyUserPositionId"
      "/succbi/nzbg/app/nzbg.app/word_nzbg/nzbg_word_team.d.docx":
        replace:
          QUERY_PARAM_COMPANY_ID: "jyEntId"
          company_id: "jyEntId"

# 仅限此程序代理的地址
noPowerUrlSwitch:
  '/succbi/nzj/app/nzj.app/nzj_detail_1.spg' : '/succbi/nzj/app/nzj.app/nzj_detail_0.spg'
  '/succbi/nzj/app/nzj.app/nzj_search_1.spg': '/succbi/nzj/app/nzj.app/nzj_search_0.spg'

apiEncryptKey: "jy@123"
