application.yaml 16 KB

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