application-test.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. server:
  2. port: 5858
  3. max-http-header-size: 10MB
  4. hystrix:
  5. threadpool:
  6. default:
  7. coreSize: 200 #并发执行的最大线程数,默认10
  8. maxQueueSize: 200 #BlockingQueue的最大队列数
  9. queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
  10. command:
  11. default:
  12. execution:
  13. timeout:
  14. enabled: true
  15. isolation:
  16. strategy: SEMAPHORE
  17. semaphore:
  18. maxConcurrentRequests: 2000
  19. thread:
  20. timeoutInMilliseconds: 20000
  21. ribbon:
  22. ReadTimeout: 20000
  23. ConnectTimeout: 20000
  24. MaxAutoRetries: 0
  25. MaxAutoRetriesNextServer: 1
  26. feign:
  27. hystrix:
  28. enabled: true
  29. #开启Feign请求压缩
  30. compression:
  31. response:
  32. enabled: true
  33. httpclient:
  34. enabled: false
  35. okhttp:
  36. enabled: true
  37. max-connections: 1000 # 默认值
  38. max-connections-per-route: 250 # 默认值
  39. management:
  40. endpoints:
  41. web:
  42. exposure:
  43. include: bus-refresh,health,info,hystrix.stream
  44. cors:
  45. allowed-origins: "*"
  46. allowed-methods: "*"
  47. endpoint:
  48. health:
  49. show-details: always
  50. # 驱动配置信息
  51. spring:
  52. datasource:
  53. druid:
  54. driver-class-name: com.mysql.cj.jdbc.Driver
  55. platform: mysql
  56. url: jdbc:mysql://192.168.2.241:3306/sys-mrqcneo?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
  57. username: root
  58. password: lantone
  59. # 连接池的配置信息
  60. # 初始化大小,最小,最大
  61. initialSize: 5
  62. minIdle: 5
  63. maxActive: 20
  64. # 配置获取连接等待超时的时间
  65. maxWait: 60000
  66. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  67. timeBetweenEvictionRunsMillis: 60000
  68. # 配置一个连接在池中最小生存的时间,单位是毫秒
  69. minEvictableIdleTimeMillis: 300000
  70. validationQuery: SELECT 1 FROM DUAL
  71. testWhileIdle: true
  72. testOnBorrow: false
  73. testOnReturn: false
  74. # 打开PSCache,并且指定每个连接上PSCache的大小
  75. poolPreparedStatements: true
  76. maxPoolPreparedStatementPerConnectionSize: 20
  77. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  78. filters.commons-log.connection-logger-name: wall,log4j
  79. filter:
  80. stat:
  81. enabled: true
  82. mergeSql: true
  83. log-slow-sql: true
  84. slow-sql-millis: 2000
  85. #监控配置
  86. web-stat-filter:
  87. enabled: true
  88. url-pattern: /*
  89. exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
  90. # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
  91. stat-view-servlet:
  92. enabled: true
  93. url-pattern: /druid/*
  94. reset-enable: false
  95. login-username: root
  96. login-password: root
  97. jackson:
  98. date-format: yyyy-MM-dd HH:mm:ss
  99. time-zone: GMT+8
  100. #redis
  101. redis:
  102. database:
  103. token: 8 # Token索引
  104. host: 192.168.2.241 #Redis服务器地址
  105. port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
  106. password: lantone # Redis服务器连接密码(默认为空)
  107. lettuce:
  108. pool:
  109. max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
  110. max-idle: 5 # 连接池中的最大空闲连接
  111. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  112. min-idle: 0 # 连接池中的最小空闲连接
  113. timeout: 20000 # 连接超时时间(毫秒)
  114. #mybatis
  115. mybatis-plus:
  116. mapper-locations: classpath:/mapper/*Mapper.xml
  117. #实体扫描,多个package用逗号或者分号分隔
  118. typeAliasesPackage: com.diagbot.entity
  119. global-config:
  120. #刷新mapper 调试神器
  121. db-config:
  122. #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
  123. id-type: id_worker
  124. #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
  125. field-strategy: not_empty
  126. #驼峰下划线转换
  127. column-underline: true
  128. #数据库大写下划线转换
  129. #capital-mode: true
  130. #刷新mapper 调试神器
  131. refresh-mapper: true
  132. #逻辑删除配置
  133. logic-delete-value: 0
  134. logic-not-delete-value: 1
  135. #自定义填充策略接口实现
  136. #meta-object-handler: com.baomidou.springboot.xxx
  137. #自定义SQL注入器
  138. #sql-injector: com.baomidou.springboot.xxx
  139. configuration:
  140. map-underscore-to-camel-case: true
  141. cache-enabled: false
  142. swagger:
  143. enable: true