application.yaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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: 16MB # 单个文件大小
  13. max-request-size: 32MB # 设置总上传的文件大小
  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: true
  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. index: default-index
  132. prefix: "default:"
  133. qdrant:
  134. collection-name: knowledge_segment
  135. host: 127.0.0.1
  136. port: 6334
  137. use-tls: false
  138. api-key:
  139. qianfan: # 文心一言
  140. api-key: x0cuLZ7XsaTCU08vuJWO87Lg
  141. secret-key: R9mYF9dl9KASgi5RUq0FQt3wRisSnOcK
  142. zhipuai: # 智谱 AI
  143. api-key: 32f84543e54eee31f8d56b2bd6020573.3vh9idLJZ2ZhxDEs
  144. openai: # OpenAI 官方
  145. api-key: sk-aN6nWn3fILjrgLFT0fC4Aa60B72e4253826c77B29dC94f17
  146. base-url: https://api.gptsapi.net
  147. azure: # OpenAI 微软
  148. openai:
  149. endpoint: https://eastusprejade.openai.azure.com
  150. api-key: xxx
  151. ollama:
  152. base-url: http://127.0.0.1:11434
  153. chat:
  154. model: llama3
  155. stabilityai:
  156. api-key: sk-e53UqbboF8QJCscYvzJscJxJXoFcFg4iJjl1oqgE7baJETmx
  157. dashscope: # 通义千问
  158. api-key: sk-71800982914041848008480000000000
  159. yudao:
  160. ai:
  161. deep-seek: # DeepSeek
  162. enable: true
  163. api-key: sk-e94db327cc7d457d99a8de8810fc6b12
  164. model: deepseek-chat
  165. doubao: # 字节豆包
  166. enable: true
  167. api-key: 5c1b5747-26d2-4ebd-a4e0-dd0e8d8b4272
  168. model: doubao-1-5-lite-32k-250115
  169. hunyuan: # 腾讯混元
  170. enable: true
  171. api-key: sk-abc
  172. model: hunyuan-turbo
  173. siliconflow: # 硅基流动
  174. enable: true
  175. api-key: sk-epsakfenqnyzoxhmbucsxlhkdqlcbnimslqoivkshalvdozz
  176. model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
  177. xinghuo: # 讯飞星火
  178. enable: true
  179. appKey: 75b161ed2aef4719b275d6e7f2a4d4cd
  180. secretKey: YWYxYWI2MTA4ODI2NGZlYTQyNjAzZTcz
  181. model: generalv3.5
  182. midjourney:
  183. enable: true
  184. # base-url: https://api.holdai.top/mj-relax/mj
  185. base-url: https://api.holdai.top/mj
  186. api-key: sk-dZEPiVaNcT3FHhef51996bAa0bC74806BeAb620dA5Da10Bf
  187. notify-url: http://java.nat300.top/admin-api/ai/image/midjourney/notify
  188. suno:
  189. enable: true
  190. # base-url: https://suno-55ishh05u-status2xxs-projects.vercel.app
  191. base-url: http://127.0.0.1:3001
  192. --- #################### 芋道相关配置 ####################
  193. yudao:
  194. info:
  195. version: 1.0.0
  196. base-package: cn.iocoder.yudao
  197. web:
  198. admin-ui:
  199. url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
  200. xss:
  201. enable: false
  202. exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
  203. - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
  204. - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
  205. security:
  206. permit-all_urls:
  207. - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
  208. websocket:
  209. enable: true # websocket的开关
  210. path: /infra/ws # 路径
  211. sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq
  212. sender-rocketmq:
  213. topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic
  214. consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group
  215. sender-rabbitmq:
  216. exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange
  217. queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue
  218. sender-kafka:
  219. topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
  220. consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
  221. swagger:
  222. title: 芋道快速开发平台
  223. description: 提供管理后台、用户 App 的所有功能
  224. version: ${yudao.info.version}
  225. url: ${yudao.web.admin-ui.url}
  226. email: xingyu4j@vip.qq.com
  227. license: MIT
  228. license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE
  229. codegen:
  230. base-package: ${yudao.info.base-package}
  231. db-schemas: ${spring.datasource.dynamic.datasource.master.name}
  232. front-type: 20 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
  233. unit-test-enable: false # 是否生成单元测试
  234. tenant: # 多租户相关配置项
  235. enable: true
  236. ignore-urls:
  237. - /admin-api/system/tenant/get-id-by-name # 基于名字获取租户,不许带租户编号
  238. - /admin-api/system/tenant/get-by-website # 基于域名获取租户,不许带租户编号
  239. - /admin-api/system/captcha/get # 获取图片验证码,和租户无关
  240. - /admin-api/system/captcha/check # 校验图片验证码,和租户无关
  241. - /admin-api/infra/file/*/get/** # 获取图片,和租户无关
  242. - /admin-api/system/sms/callback/* # 短信回调接口,无法带上租户编号
  243. - /admin-api/pay/notify/** # 支付回调通知,不携带租户编号
  244. - /jmreport/* # 积木报表,无法携带租户编号
  245. - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
  246. ignore-tables:
  247. - system_tenant
  248. - system_tenant_package
  249. - system_dict_data
  250. - system_dict_type
  251. - system_error_code
  252. - system_menu
  253. - system_sms_channel
  254. - system_sms_template
  255. - system_sms_log
  256. - system_sensitive_word
  257. - system_oauth2_client
  258. - system_mail_account
  259. - system_mail_template
  260. - system_mail_log
  261. - system_notify_template
  262. - infra_codegen_column
  263. - infra_codegen_table
  264. - infra_config
  265. - infra_file_config
  266. - infra_file
  267. - infra_file_content
  268. - infra_job
  269. - infra_job_log
  270. - infra_job_log
  271. - infra_data_source_config
  272. - jimu_dict
  273. - jimu_dict_item
  274. - jimu_report
  275. - jimu_report_data_source
  276. - jimu_report_db
  277. - jimu_report_db_field
  278. - jimu_report_db_param
  279. - jimu_report_link
  280. - jimu_report_map
  281. - jimu_report_share
  282. - rep_demo_dxtj
  283. - rep_demo_employee
  284. - rep_demo_gongsi
  285. - rep_demo_jianpiao
  286. - tmp_report_data_1
  287. - tmp_report_data_income
  288. ignore-caches:
  289. - user_role_ids
  290. - permission_menu_ids
  291. - oauth_client
  292. - notify_template
  293. - mail_account
  294. - mail_template
  295. - sms_template
  296. sms-code: # 短信验证码相关的配置项
  297. expire-times: 10m
  298. send-frequency: 1m
  299. send-maximum-quantity-per-day: 10
  300. begin-code: 9999 # 这里配置 9999 的原因是,测试方便。
  301. end-code: 9999 # 这里配置 9999 的原因是,测试方便。
  302. trade:
  303. order:
  304. pay-expire-time: 2h # 支付的过期时间
  305. receive-expire-time: 14d # 收货的过期时间
  306. comment-expire-time: 7d # 评论的过期时间
  307. express:
  308. client: kd_niao
  309. kd-niao:
  310. api-key: cb022f1e-48f1-4c4a-a723-9001ac9676b8
  311. business-id: 1809751
  312. kd100:
  313. key: pLXUGAwK5305
  314. customer: E77DF18BE109F454A5CD319E44BF5177
  315. debug: false