blade.yaml 4.3 KB

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