application.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. spring:
  2. application:
  3. name: yudao-server
  4. profiles:
  5. active: local
  6. main:
  7. allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
  8. # Servlet 配置
  9. servlet:
  10. # 文件上传相关配置项
  11. multipart:
  12. max-file-size: 256MB # 单个文件大小
  13. max-request-size: 32GB # 设置总上传的文件大小
  14. # Jackson 配置项
  15. jackson:
  16. serialization:
  17. write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
  18. write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
  19. write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
  20. fail-on-empty-beans: false # 允许序列化无属性的 Bean
  21. # Cache 配置项
  22. cache:
  23. type: REDIS
  24. redis:
  25. time-to-live: 1h # 设置过期时间为 1 小时
  26. server:
  27. servlet:
  28. encoding:
  29. enabled: true
  30. charset: UTF-8 # 必须设置 UTF-8,避免 WebFlux 流式返回(AI 场景)会乱码问题
  31. force: true
  32. --- #################### 接口文档配置 ####################
  33. springdoc:
  34. api-docs:
  35. enabled: true
  36. path: /v3/api-docs
  37. swagger-ui:
  38. enabled: true
  39. path: /swagger-ui
  40. default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
  41. knife4j:
  42. enable: false # TODO 芋艿:需要关闭增强,具体原因见:https://github.com/xiaoymin/knife4j/issues/874
  43. setting:
  44. language: zh_cn
  45. # 工作流 Flowable 配置
  46. flowable:
  47. # 1. false: 默认值,Flowable 启动时,对比数据库表中保存的版本,如果不匹配。将抛出异常
  48. # 2. true: 启动时会对数据库中所有表进行更新操作,如果表存在,不做处理,反之,自动创建表
  49. # 3. create_drop: 启动时自动创建表,关闭时自动删除表
  50. # 4. drop_create: 启动时,删除旧表,再创建新表
  51. database-schema-update: true # 设置为 false,可通过 https://github.com/flowable/flowable-sql 初始化
  52. db-history-used: true # flowable6 默认 true 生成信息表,无需手动设置
  53. check-process-definitions: false # 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程
  54. history-level: audit # full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数
  55. # MyBatis Plus 的配置项
  56. mybatis-plus:
  57. configuration:
  58. map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
  59. global-config:
  60. db-config:
  61. id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
  62. # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
  63. # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
  64. # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
  65. logic-delete-value: 1 # 逻辑已删除值(默认为 1)
  66. logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
  67. banner: false # 关闭控制台的 Banner 打印
  68. type-aliases-package: ${yudao.info.base-package}.module.*.dal.dataobject
  69. encryptor:
  70. password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
  71. mybatis-plus-join:
  72. banner: false # 是否打印 mybatis plus join banner,默认true
  73. sub-table-logic: true # 全局启用副表逻辑删除,默认true。关闭后关联查询不会加副表逻辑删除
  74. ms-cache: true # 拦截器MappedStatement缓存,默认 true
  75. table-alias: t # 表别名(默认 t)
  76. logic-del-type: on # 副表逻辑删除条件的位置,支持 WHERE、ON,默认 ON
  77. # Spring Data Redis 配置
  78. spring:
  79. data:
  80. redis:
  81. repositories:
  82. enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
  83. # VO 转换(数据翻译)相关
  84. easy-trans:
  85. is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
  86. --- #################### 验证码相关配置 ####################
  87. aj:
  88. captcha:
  89. jigsaw: classpath:images/jigsaw # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
  90. pic-click: classpath:images/pic-click # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径
  91. cache-type: redis # 缓存 local/redis...
  92. cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存
  93. timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行
  94. type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选
  95. water-mark: 芋道源码 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
  96. interference-options: 0 # 滑动干扰项(0/1/2)
  97. req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false
  98. req-get-lock-limit: 5 # 验证失败 5 次,get接口锁定
  99. req-get-lock-seconds: 10 # 验证失败后,锁定时间间隔
  100. req-get-minute-limit: 30 # get 接口一分钟内请求数限制
  101. req-check-minute-limit: 60 # check 接口一分钟内请求数限制
  102. req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制
  103. --- #################### 消息队列相关 ####################
  104. # rocketmq 配置项,对应 RocketMQProperties 配置类
  105. rocketmq:
  106. # Producer 配置项
  107. producer:
  108. group: ${spring.application.name}_PRODUCER # 生产者分组
  109. spring:
  110. # Kafka 配置项,对应 KafkaProperties 配置类
  111. kafka:
  112. # Kafka Producer 配置项
  113. producer:
  114. acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。
  115. retries: 3 # 发送失败时,重试发送的次数
  116. value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化
  117. # Kafka Consumer 配置项
  118. consumer:
  119. auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解
  120. value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
  121. properties:
  122. spring.json.trusted.packages: '*'
  123. # Kafka Consumer Listener 监听器配置
  124. listener:
  125. missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
  126. --- #################### AI 相关配置 ####################
  127. spring:
  128. ai:
  129. vectorstore: # 向量存储
  130. redis:
  131. initialize-schema: true
  132. index: knowledge_index # Redis 中向量索引的名称:用于存储和检索向量数据的索引标识符,所有相关的向量搜索操作都会基于这个索引进行
  133. prefix: "knowledge_segment:" # Redis 中存储向量数据的键名前缀:这个前缀会添加到每个存储在 Redis 中的向量数据键名前,每个 document 都是一个 hash 结构
  134. qdrant:
  135. initialize-schema: true
  136. collection-name: knowledge_segment # Qdrant 中向量集合的名称:用于存储向量数据的集合标识符,所有相关的向量操作都会在这个集合中进行
  137. host: 127.0.0.1
  138. port: 6334
  139. milvus:
  140. initialize-schema: true
  141. database-name: default # Milvus 中数据库的名称
  142. collection-name: knowledge_segment # Milvus 中集合的名称:用于存储向量数据的集合标识符,所有相关的向量操作都会在这个集合中进行
  143. client:
  144. host: 127.0.0.1
  145. port: 19530
  146. qianfan: # 文心一言
  147. api-key: x0cuLZ7XsaTCU08vuJWO87Lg
  148. secret-key: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK
  149. zhipuai: # 智谱 AI
  150. api-key: 32f84543e54eee31f8d56b2bd6020573.3vh9idLJZ2ZhxDEs
  151. openai: # OpenAI 官方
  152. api-key: sk-aN6nWn3fILjrgLFT0fC4Aa60B72e4253826c77B29dC94f17
  153. base-url: https://api.gptsapi.net
  154. azure: # OpenAI 微软
  155. openai:
  156. endpoint: https://eastusprejade.openai.azure.com
  157. api-key: xxx
  158. ollama:
  159. base-url: http://127.0.0.1:11434
  160. chat:
  161. model: llama3
  162. stabilityai:
  163. api-key: sk-e53UqbboF8QJCscYvzJscJxJXoFcFg4iJjl1oqgE7baJETmx
  164. dashscope: # 通义千问
  165. api-key: sk-71800982914041848008480000000000
  166. minimax: # Minimax:https://www.minimaxi.com/
  167. api-key: xxxx
  168. moonshot: # 月之暗灭(KIMI)
  169. api-key: sk-abc
  170. yudao:
  171. ai:
  172. deep-seek: # DeepSeek
  173. enable: true
  174. api-key: sk-e94db327cc7d457d99a8de8810fc6b12
  175. model: deepseek-chat
  176. doubao: # 字节豆包
  177. enable: true
  178. api-key: 5c1b5747-26d2-4ebd-a4e0-dd0e8d8b4272
  179. model: doubao-1-5-lite-32k-250115
  180. hunyuan: # 腾讯混元
  181. enable: true
  182. api-key: sk-abc
  183. model: hunyuan-turbo
  184. siliconflow: # 硅基流动
  185. enable: true
  186. api-key: sk-epsakfenqnyzoxhmbucsxlhkdqlcbnimslqoivkshalvdozz
  187. model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
  188. xinghuo: # 讯飞星火
  189. enable: true
  190. appKey: 75b161ed2aef4719b275d6e7f2a4d4cd
  191. secretKey: YWYxYWI2MTA4ODI2NGZlYTQyNjAzZTcz
  192. model: generalv3.5
  193. baichuan: # 百川智能
  194. enable: true
  195. api-key: sk-abc
  196. model: Baichuan4-Turbo
  197. midjourney:
  198. enable: true
  199. # base-url: https://api.holdai.top/mj-relax/mj
  200. base-url: https://api.holdai.top/mj
  201. api-key: sk-dZEPiVaNcT3FHhef51996bAa0bC74806BeAb620dA5Da10Bf
  202. notify-url: http://java.nat300.top/admin-api/ai/image/midjourney/notify
  203. suno:
  204. enable: true
  205. # base-url: https://suno-55ishh05u-status2xxs-projects.vercel.app
  206. base-url: http://127.0.0.1:3001
  207. --- #################### 芋道相关配置 ####################
  208. yudao:
  209. info:
  210. version: 1.0.0
  211. base-package: cn.iocoder.yudao
  212. web:
  213. admin-ui:
  214. url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
  215. xss:
  216. enable: false
  217. exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
  218. - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
  219. - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
  220. security:
  221. permit-all_urls:
  222. - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
  223. websocket:
  224. enable: true # websocket的开关
  225. path: /infra/ws # 路径
  226. sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq
  227. sender-rocketmq:
  228. topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic
  229. consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group
  230. sender-rabbitmq:
  231. exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange
  232. queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue
  233. sender-kafka:
  234. topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
  235. consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
  236. swagger:
  237. title: 芋道快速开发平台
  238. description: 提供管理后台、用户 App 的所有功能
  239. version: ${yudao.info.version}
  240. url: ${yudao.web.admin-ui.url}
  241. email: xingyu4j@vip.qq.com
  242. license: MIT
  243. license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE
  244. codegen:
  245. base-package: ${yudao.info.base-package}
  246. db-schemas: ${spring.datasource.dynamic.datasource.master.name}
  247. front-type: 20 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
  248. unit-test-enable: false # 是否生成单元测试
  249. tenant: # 多租户相关配置项
  250. enable: true
  251. ignore-urls:
  252. - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号
  253. - /admin-api/system/tenant/get-by-website # 基于域名获取租户,不许带租户编号
  254. - /admin-api/system/tenant/simple-list # 获取租户列表,不许带租户编号
  255. - /admin-api/system/captcha/get # 获取图片验证码,和租户无关
  256. - /admin-api/system/captcha/check # 校验图片验证码,和租户无关
  257. - /admin-api/infra/file/*/get/** # 获取图片,和租户无关
  258. - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号
  259. - /admin-api/pay/notify/** # 支付回调通知,不携带租户编号
  260. - /jmreport/* # 积木报表,无法携带租户编号
  261. - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
  262. ignore-tables:
  263. - system_tenant
  264. - system_tenant_package
  265. - system_dict_data
  266. - system_dict_type
  267. - system_error_code
  268. - system_menu
  269. - system_sms_channel
  270. - system_sms_template
  271. - system_sms_log
  272. - system_sensitive_word
  273. - system_oauth2_client
  274. - system_mail_account
  275. - system_mail_template
  276. - system_mail_log
  277. - system_notify_template
  278. - infra_codegen_column
  279. - infra_codegen_table
  280. - infra_config
  281. - infra_file_config
  282. - infra_file
  283. - infra_file_content
  284. - infra_job
  285. - infra_job_log
  286. - infra_job_log
  287. - iot_plugin_info
  288. - iot_plugin_instance
  289. - infra_data_source_config
  290. - jimu_dict
  291. - jimu_dict_item
  292. - jimu_report
  293. - jimu_report_data_source
  294. - jimu_report_db
  295. - jimu_report_db_field
  296. - jimu_report_db_param
  297. - jimu_report_link
  298. - jimu_report_map
  299. - jimu_report_share
  300. - rep_demo_dxtj
  301. - rep_demo_employee
  302. - rep_demo_gongsi
  303. - rep_demo_jianpiao
  304. - tmp_report_data_1
  305. - tmp_report_data_income
  306. ignore-caches:
  307. - user_role_ids
  308. - permission_menu_ids
  309. - oauth_client
  310. - notify_template
  311. - mail_account
  312. - mail_template
  313. - sms_template
  314. - iot:device
  315. - iot:thing_model_list
  316. sms-code: # 短信验证码相关的配置项
  317. expire-times: 10m
  318. send-frequency: 1m
  319. send-maximum-quantity-per-day: 10
  320. begin-code: 1000 # 这里配置 9999 的原因是,测试方便。
  321. end-code: 9999 # 这里配置 9999 的原因是,测试方便。
  322. trade:
  323. order:
  324. pay-expire-time: 2h # 支付的过期时间
  325. receive-expire-time: 14d # 收货的过期时间
  326. comment-expire-time: 7d # 评论的过期时间
  327. express:
  328. client: KD_NIAO
  329. kd-niao:
  330. api-key: cb022f1e-48f1-4c4a-a723-9001ac9676b8
  331. business-id: 1809751
  332. request-type: 1002 # 免费版 1002;付费版 8001
  333. kd100:
  334. key: pLXUGAwK5305
  335. customer: E77DF18BE109F454A5CD319E44BF5177
  336. debug: false
  337. # 插件配置 TODO 芋艿:【IOT】需要处理下
  338. pf4j:
  339. pluginsDir: /Users/anhaohao/code/gitee/ruoyi-vue-pro/plugins # 插件目录