blade-prod.yml 2.1 KB
Newer Older
S
smallchill 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
#服务器配置
server:
  undertow:
    # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
    io-threads: 4
    # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
    worker-threads: 20
    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
    buffer-size: 1024
    # 是否分配的直接内存
    direct-buffers: true

#spring配置
spring:
  redis:
    ##redis 单机环境配置
    host: 192.168.186.129
    port: 3379
    password:
    database: 0
    ssl: false
    ##redis 集群环境配置
    #cluster:
    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
    #  commandTimeout: 5000
  devtools:
    restart:
      log-condition-evaluation-delta: false

#feign配置
feign:
  hystrix:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false

#hystrix配置
hystrix:
  threadpool:
    default:
      coreSize: 300
      maxQueueSize: 1000
      queueSizeRejectionThreshold: 800
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 720000

#ribbon配置
ribbon:
  #对当前实例的重试次数
  MaxAutoRetries: 1
  #切换实例的重试次数
  MaxAutoRetriesNextServer: 2
  #请求处理的超时时间
  ReadTimeout: 60000
  #请求连接的超时时间
  ConnectTimeout: 60000
  #对所有操作请求都进行重试
  OkToRetryOnAllOperations: true

#对外暴露端口
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: always

#项目模块集中配置
blade:
  #通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
  datasource:
    prod:
      url: jdbc:mysql://192.168.186.129:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true
      username: root
      password: root