blade.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. nacos:
  17. discovery:
  18. # 禁用云命名空间解析,防止和云平台环境变量冲突
  19. isUseCloudNamespaceParsing: false
  20. config:
  21. # 禁用云命名空间解析,防止和云平台环境变量冲突
  22. isUseCloudNamespaceParsing: false
  23. sentinel:
  24. eager: true
  25. devtools:
  26. restart:
  27. log-condition-evaluation-delta: false
  28. livereload:
  29. port: 23333
  30. #feign配置
  31. feign:
  32. sentinel:
  33. enabled: true
  34. okhttp:
  35. enabled: true
  36. httpclient:
  37. enabled: false
  38. #对外暴露端口
  39. management:
  40. endpoints:
  41. web:
  42. exposure:
  43. include: "*"
  44. endpoint:
  45. health:
  46. show-details: always
  47. #springdoc-openapi配置
  48. springdoc:
  49. default-flat-param-object: true
  50. #knife4j配置
  51. knife4j:
  52. #启用
  53. enable: true
  54. #基础认证
  55. basic:
  56. enable: false
  57. username: blade
  58. password: blade
  59. #增强配置
  60. setting:
  61. enableSwaggerModels: true
  62. enableDocumentManage: true
  63. enableHost: false
  64. enableHostText: http://localhost
  65. enableRequestCache: true
  66. enableFilterMultipartApis: false
  67. enableFilterMultipartApiMethodType: POST
  68. language: zh_cn
  69. enableFooter: false
  70. enableFooterCustom: true
  71. footerCustomContent: Copyright © 2024 BladeX All Rights Reserved
  72. #swagger公共信息
  73. swagger:
  74. title: BladeX 接口文档系统
  75. description: BladeX 接口文档系统
  76. version: 4.0.1.RELEASE
  77. license: Powered By BladeX
  78. license-url: https://bladex.cn
  79. terms-of-service-url: https://bladex.cn
  80. contact:
  81. name: 翼宿
  82. email: bladejava@qq.com
  83. url: https://gitee.com/smallc
  84. #blade配置
  85. blade:
  86. #token配置
  87. token:
  88. #是否有状态
  89. state: false
  90. #是否单用户登录
  91. single: false
  92. #单用户登录范围
  93. single-level: all
  94. #token签名 使用blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
  95. sign-key: 9zRBz6fN6z1JNECplVkCwLOQLetDxYz5
  96. #token加密 使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取
  97. crypto-key: 9pJN82H3tes29QDR94JckqfeqeqqBzST
  98. #接口配置
  99. api:
  100. #报文加密配置
  101. crypto:
  102. #启用报文加密配置
  103. enabled: false
  104. #使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
  105. aes-key: 4ugu5JltSSYTYOTVUvvN4zHllBnGuf5r
  106. #使用blade-auth服务 @org.springblade.test.CryptoKeyGenerator 获取,需和前端保持一致
  107. des-key: a7w6ArN67olCsJeo
  108. #jackson配置
  109. jackson:
  110. #null自动转空值
  111. null-to-empty: true
  112. #大数字自动转字符串
  113. big-num-to-string: true
  114. #支持text文本请求,与报文加密同时开启
  115. support-text-plain: false
  116. #redis序列化方式
  117. redis:
  118. serializer-type: protostuff
  119. #日志配置
  120. log:
  121. request:
  122. #开启控制台请求日志
  123. enabled: true
  124. #控制台请求日志忽略
  125. skip-url:
  126. - /blade-desk/notice/list
  127. - /blade-chat/weixin/**
  128. #开启错误日志入库
  129. error-log: true
  130. #xss配置
  131. xss:
  132. enabled: true
  133. skip-url:
  134. - /weixin
  135. - /notice/submit
  136. - /model/submit
  137. - /datasource/submit
  138. #安全框架配置
  139. secure:
  140. #严格模式
  141. #缺失令牌字段则取消授权
  142. strict-token: true
  143. #缺失请求头则取消授权
  144. strict-header: true
  145. #接口放行
  146. skip-url:
  147. - /test/**
  148. #授权认证配置
  149. auth:
  150. - method: ALL
  151. pattern: /chat/wechat/**
  152. expression: "hasAuth()"
  153. - method: ALL
  154. pattern: /chat/qq/**
  155. expression: "hasStrictToken()"
  156. - method: ALL
  157. pattern: /chat/ding/**
  158. expression: "hasStrictHeader()"
  159. - method: POST
  160. pattern: /dashboard/upload
  161. expression: "hasTimeAuth(9, 17)"
  162. - method: POST
  163. pattern: /dashboard/submit
  164. expression: "hasAnyRole('administrator', 'admin', 'user')"
  165. #基础认证配置
  166. basic:
  167. - method: ALL
  168. pattern: /dashboard/info
  169. username: "blade"
  170. password: "blade"
  171. #动态签名认证配置
  172. sign:
  173. - method: ALL
  174. pattern: /dashboard/sign
  175. crypto: "sha1"
  176. #多终端认证配置
  177. client:
  178. - client-id: sword
  179. path-patterns:
  180. - /sword/**
  181. - client-id: saber
  182. path-patterns:
  183. - /saber/**
  184. #多租户配置
  185. tenant:
  186. #多租户增强
  187. enhance: true
  188. #多租户授权保护
  189. license: false
  190. #动态数据源功能
  191. dynamic-datasource: false
  192. #动态数据源全局扫描
  193. dynamic-global: false
  194. #多租户字段名
  195. column: tenant_id
  196. #排除多租户逻辑
  197. exclude-tables:
  198. - blade_user
  199. #分库分表配置
  200. sharding:
  201. enabled: false