#Application
server:
  port: 10001
  servlet:
    context-path: /release
#spring
spring:
  application:
    name: release
    #Database
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_ims?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
    username: tmj
    password: MMC@2022&MYSQL
    #   Druid数据源配置
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 1     #初始化连接池大小
      min-idle: 1         #最小大小
      max-active: 1       #最大大小
      max-wait: 60000      #获取连接时最大等待时间，单位毫秒
      time-between-eviction-runs-millis: 60000   #配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒
      min-evictable-idle-time-millis: 300000     #配置一个连接在池中最小生存的时间，单位是毫秒
      validation-query: SELECT 1 FROM DUAL       #用来检测连接是否有效的sql
      test-while-idle: true                      #申请连接的时候检测，建议配置为true，不影响性能，并且保证安全性
      testOnBorrow: false                        #获取连接时执行检测，建议关闭，影响性能
      testOnReturn: false                        #归还连接时执行检测，建议关闭，影响性能
      pool-prepared-statements: false            #是否开启PSCache，PSCache对支持游标的数据库性能提升巨大，oracle建议开启，mysql下建议关闭
      filters: stat,wall                   #配置扩展插件，常用的插件有=>stat:监控统计  log4j:日志  wall:防御sql注入
      filter:
        wall:
          config:
            multi-statement-allow: true
          db-type: mysql
          enabled: true
      connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000   #打开慢sql记录和延迟时间
      web-stat-filter:
        url-pattern: /*
        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
        enabled: true
      stat-view-servlet:
        enabled: true
        login-username: druid
        login-password: druid
  #cloud
  cloud:
    loadbalancer:
      retry:
        enabled: true
  #Redis
  redis:
    database: 0
    host: r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com
    password: MMC@2022&REDIS
    port: 6379
    #连接池
    lettuce:
      shutdown-timeout: 1000 # 关闭超时时间-ms
      pool:
        #最大连接个数
        max-active: 30
        #等待时间-ms
        max-wait: 1000ms
        #最大空闲
        max-idle: 8
        #初始化最小
        min-idle: 1
  #rabbitMQ
  rabbitmq:
    host: 119.23.248.181
    port: 5672
    username: admin
    password: mmc123456
    virtual-host: /
    listener:
      simple:
        #acknowledge-mode: manual #设置确认模式手工确认
        concurrency: 3 #消费者最小数量
        max-concurrency: 10 # 消费者最大数量
        # 一般消费者自动签收模式下可以添加下面配置，用于消费抛出异常后进行消息重新投递设置
        retry: 
          enabled: true #是否开启消费者重试（为false时关闭消费者重试）
          max-attempts: 3 # 最大重试重新投递消息次数
          initial-interval: 900s #重试重新投递消息间隔时间（单位秒）
        default-requeue-rejected: false #重试次数超过上面的设置之后是否丢弃(消费者listener抛出异常，是否重回队列，默认true：重回队列， false为不重回队列(结合死信交换机))

#eureka   eureka.client.register-with-eureka=true
eureka:
  instance:
    prefer-ip-address: true
    ip-address: 127.0.0.1
    instance-id: ${eureka.instance.ip-address}:${server.port}@${random.int}
    status-page-url: http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/swagger-ui.html
  client:
    fetch-registry: true
    service-url:
      defaultZone: http://edmin:sharefly1200@127.0.0.1:20080/eureka/


#logging
logging:
  level:
    com:
      mmc:
        csf: DEBUG

#mybatis
mybatis:
  executor-type: simple
  mapper-locations: classpath:mapper/**/*.xml
  type-aliases-package: com.mmc.csf
  configuration:
    map-underscore-to-camel-case: true

#feign
feign:
  client:
    config:
      default:
        connect-timeout: 3000
        read-timeout: 6000
  #Okhttp参数配置
  httpclient:
    enabled: false
  okhttp:
    enabled: true
  hystrix:
    enabled: true
hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            # hystrix 超时时间
            timeoutInMilliseconds: 9000
#ribbon-ribbo和hystrix时间取最小的生效，feign和ribbon的超时时间只能选其一生效feign优先级高于ribbon
ribbon:
  okhttp:
    enabled: true

#mmc:
#  appid: 80001
#  url: http://121.37.224.147
#  companycode: MMC
#
##logstash服务器地址
#logstash:
#  host: 10.86.210.18
##logstash端口
#  port: 8084
#
#
#wechat:
#  sub:
#    appid: wx5c6a105a0ddca4c5
#    secret: 96c75255dd26f82f8d55e15b59e101c7
#
#rabbitmq:
#  enabled: false
#  exchange: REPOORDER_WX_API_DIRECT_DEV
#
## 查看健康情况-开发分支配置则可-其余分支请勿配置
#management:
#  endpoints:
#    web:
#      exposure:
#        include: "*"