blade.yaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. #服务器配置
  2. server:
  3. undertow:
  4. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  5. io-threads: 16
  6. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  7. worker-threads: 400
  8. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  9. buffer-size: 1024
  10. # 是否分配的直接内存
  11. direct-buffers: true
  12. #spring配置
  13. spring:
  14. cloud:
  15. sentinel:
  16. eager: true
  17. devtools:
  18. restart:
  19. log-condition-evaluation-delta: false
  20. livereload:
  21. port: 23333
  22. #feign配置
  23. feign:
  24. hystrix:
  25. enabled: true
  26. okhttp:
  27. enabled: true
  28. httpclient:
  29. enabled: false
  30. #hystrix配置
  31. hystrix:
  32. threadpool:
  33. default:
  34. coreSize: 300
  35. maxQueueSize: 1000
  36. queueSizeRejectionThreshold: 800
  37. command:
  38. default:
  39. execution:
  40. isolation:
  41. thread:
  42. timeoutInMilliseconds: 5000
  43. #ribbon配置
  44. ribbon:
  45. #对当前实例的重试次数
  46. MaxAutoRetries: 1
  47. #切换实例的重试次数
  48. MaxAutoRetriesNextServer: 2
  49. #请求处理的超时时间
  50. ReadTimeout: 60000
  51. #请求连接的超时时间
  52. ConnectTimeout: 60000
  53. #对所有操作请求都进行重试
  54. OkToRetryOnAllOperations: true
  55. #对外暴露端口
  56. management:
  57. endpoints:
  58. web:
  59. exposure:
  60. include: "*"
  61. endpoint:
  62. health:
  63. show-details: always
  64. #knife4j配置
  65. knife4j:
  66. #启用
  67. enable: true
  68. #基础认证
  69. basic:
  70. enable: false
  71. username: blade
  72. password: blade
  73. #增强配置
  74. setting:
  75. enableSwaggerModels: true
  76. enableDocumentManage: true
  77. enableHost: false
  78. enableHostText: http://localhost
  79. enableRequestCache: true
  80. enableFilterMultipartApis: false
  81. enableFilterMultipartApiMethodType: POST
  82. language: zh-CN
  83. enableFooter: false
  84. enableFooterCustom: true
  85. footerCustomContent: Copyright © 2021 BladeX All Rights Reserved
  86. #swagger公共信息
  87. swagger:
  88. title: BladeX 接口文档系统
  89. description: BladeX 接口文档系统
  90. version: 2.7.1.RELEASE
  91. license: Powered By BladeX
  92. license-url: https://bladex.vip
  93. terms-of-service-url: https://bladex.vip
  94. contact:
  95. name: smallchill
  96. email: smallchill@163.com
  97. url: https://gitee.com/smallc
  98. #blade配置
  99. blade:
  100. #token配置
  101. token:
  102. #是否有状态
  103. state: false
  104. #redis序列化方式
  105. redis:
  106. serializer-type: protostuff
  107. #接口配置
  108. api:
  109. #报文加密配置
  110. crypto:
  111. #启用报文加密配置
  112. enabled: false
  113. #使用AesUtil.genAesKey()生成
  114. aes-key: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm
  115. #使用DesUtil.genDesKey()生成
  116. des-key: jMVCBsFGDQr1USHo
  117. #jackson配置
  118. jackson:
  119. #null自动转空值
  120. null-to-empty: true
  121. #大数字自动转字符串
  122. big-num-to-string: true
  123. #支持text文本请求,与报文加密同时开启
  124. support-text-plain: false
  125. #xss配置
  126. xss:
  127. enabled: true
  128. skip-url:
  129. - /weixin
  130. - /notice/submit
  131. #安全框架配置
  132. secure:
  133. #接口放行
  134. skip-url:
  135. - /test/**
  136. #授权认证配置
  137. auth:
  138. - method: ALL
  139. pattern: /weixin/**
  140. expression: "hasAuth()"
  141. - method: POST
  142. pattern: /dashboard/upload
  143. expression: "hasTimeAuth(9, 17)"
  144. - method: POST
  145. pattern: /dashboard/submit
  146. expression: "hasAnyRole('administrator', 'admin', 'user')"
  147. #基础认证配置
  148. basic:
  149. - method: ALL
  150. pattern: /dashboard/info
  151. username: "blade"
  152. password: "blade"
  153. #动态签名认证配置
  154. sign:
  155. - method: ALL
  156. pattern: /dashboard/sign
  157. crypto: "sha1"
  158. #多终端认证配置
  159. client:
  160. - client-id: sword
  161. path-patterns:
  162. - /sword/**
  163. - client-id: saber
  164. path-patterns:
  165. - /saber/**
  166. #多租户配置
  167. tenant:
  168. #多租户增强
  169. enhance: true
  170. #多租户授权保护
  171. license: false
  172. #动态数据源功能
  173. dynamic-datasource: false
  174. #动态数据源全局扫描
  175. dynamic-global: false
  176. #多租户字段名
  177. column: tenant_id
  178. #排除多租户逻辑
  179. exclude-tables:
  180. - blade_user