spring: application: name: byzs-bjdx profiles: # active: local # active: localProd active: prodDev # active: prod main: allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。 # Servlet 配置 servlet: # 文件上传相关配置项 multipart: max-file-size: 500MB # 单个文件大小 max-request-size: 1000MB # 设置总上传的文件大小 # Jackson 配置项 jackson: serialization: write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳 write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401 write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳 fail-on-empty-beans: false # 允许序列化无属性的 Bean # Cache 配置项 cache: type: REDIS redis: time-to-live: 1h # 设置过期时间为 1 小时 server: servlet: encoding: enabled: true charset: UTF-8 # 必须设置 UTF-8,避免 WebFlux 流式返回(AI 场景)会乱码问题 force: true --- #################### 接口文档配置 #################### springdoc: api-docs: enabled: true path: /v3/api-docs swagger-ui: enabled: true path: /swagger-ui default-flat-param-object: true knife4j: enable: false setting: language: zh_cn # MyBatis Plus 的配置项 mybatis-plus: configuration: map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 global-config: db-config: id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。 # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库 # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库 # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解 logic-delete-value: 1 # 逻辑已删除值(默认为 1) logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) banner: false # 关闭控制台的 Banner 打印 type-aliases-package: ${byzs.info.base-package}.module.*.dal.dataobject encryptor: password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成 mybatis-plus-join: banner: false # 是否打印 mybatis plus join banner,默认true sub-table-logic: true # 全局启用副表逻辑删除,默认true。关闭后关联查询不会加副表逻辑删除 ms-cache: true # 拦截器MappedStatement缓存,默认 true table-alias: t # 表别名(默认 t) logic-del-type: on # 副表逻辑删除条件的位置,支持 WHERE、ON,默认 ON # Spring Data Redis 配置 spring: data: redis: repositories: enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度 lettuce: pool: max-active: 8 max-idle: 8 min-idle: 0 max-wait: -1ms shutdown-timeout: 100ms client-options: netty-threads: 16 # 增加 nettyThreads 设置 # VO 转换(数据翻译)相关 easy-trans: is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 --- #################### 验证码相关配置 #################### aj: captcha: jigsaw: classpath:images/jigsaw # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径 pic-click: classpath:images/pic-click # 滑动验证,底图路径,不配置将使用默认图片;以 classpath: 开头,取 resource 目录下路径 cache-type: redis # 缓存 local/redis... cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存 timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行 type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选 water-mark: 博雅智算源码 # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode interference-options: 0 # 滑动干扰项(0/1/2) req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false req-get-lock-limit: 5 # 验证失败 5 次,get接口锁定 req-get-lock-seconds: 10 # 验证失败后,锁定时间间隔 req-get-minute-limit: 30 # get 接口一分钟内请求数限制 req-check-minute-limit: 60 # check 接口一分钟内请求数限制 req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制 --- #################### 消息队列相关 #################### # rocketmq 配置项,对应 RocketMQProperties 配置类 #rocketmq: # # Producer 配置项 # producer: # group: ${spring.application.name}_PRODUCER # 生产者分组 # name-server: 127.0.0.1:9876 # RocketMQ Namesrv #spring: # # Kafka 配置项,对应 KafkaProperties 配置类 # kafka: # # Kafka Producer 配置项 # producer: # acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。 # retries: 3 # 发送失败时,重试发送的次数 # value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化 # # Kafka Consumer 配置项 # consumer: # auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解 # value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer # properties: # spring.json.trusted.packages: '*' # # Kafka Consumer Listener 监听器配置 # listener: # missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错 # bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔 # # RabbitMQ 配置项,对应 RabbitProperties 配置类 # rabbitmq: # host: 127.0.0.1 # RabbitMQ 服务的地址 # port: 5672 # RabbitMQ 服务的端口 # username: rabbit # RabbitMQ 服务的账号 # password: rabbit # RabbitMQ 服务的密码 --- #################### AI 相关配置 #################### spring: ai: vectorstore: # 向量存储 redis: initialize-schema: true index: knowledge_index # Redis 中向量索引的名称:用于存储和检索向量数据的索引标识符,所有相关的向量搜索操作都会基于这个索引进行 prefix: "knowledge_segment:" # Redis 中存储向量数据的键名前缀:这个前缀会添加到每个存储在 Redis 中的向量数据键名前,每个 document 都是一个 hash 结构 qdrant: initialize-schema: true collection-name: knowledge_segment # Qdrant 中向量集合的名称:用于存储向量数据的集合标识符,所有相关的向量操作都会在这个集合中进行 host: 127.0.0.1 port: 6334 milvus: initialize-schema: true database-name: default # Milvus 中数据库的名称 collection-name: knowledge_segment # Milvus 中集合的名称:用于存储向量数据的集合标识符,所有相关的向量操作都会在这个集合中进行 client: host: 127.0.0.1 port: 19530 qianfan: # 文心一言 api-key: ALTAKt1cnqv9Qe6lfhY1C0VCmE secret-key: e321c868571e4a3aa9c73f1ce1fd2db9 zhipuai: # 智谱 AI api-key: 32f84543e54eee31f8d56b2bd6020573.3vh9idLJZ2ZhxDEs openai: # OpenAI 官方 api-key: sk-aN6nWn3fILjrgLFT0fC4Aa60B72e4253826c77B29dC94f17 base-url: https://api.gptsapi.net azure: # OpenAI 微软 openai: endpoint: https://eastusprejade.openai.azure.com api-key: xxx ollama: base-url: http://127.0.0.1:11434 chat: model: llama3 stabilityai: api-key: sk-e53UqbboF8QJCscYvzJscJxJXoFcFg4iJjl1oqgE7baJETmx dashscope: # 通义千问 api-key: c8fa309b16a045b3bb4c6aa3879148cc minimax: # Minimax:https://www.minimaxi.com/ api-key: xxxx moonshot: # 月之暗灭(KIMI) api-key: sk-abc byzs: ai: vector-store: simple: # SimpleVectorStore 是本地文件存储。命名空间必须按运行环境、数据库隔离,避免切换 profile 后串库。 namespace: ${spring.application.name}-${spring.profiles.active:default} # 仅在确认旧文件属于当前环境时开启;prod 首次升级会在 application-prod.yaml 中单独开启。 migrate-legacy-file: false deep-seek: # DeepSeek enable: true api-key: sk-5b612c071f904fd59808dc07c9a4f1b8 model: deepseek-chat doubao: # 字节豆包(真实-使用中) enable: true api-key: 702a7b51-8b6b-483c-8488-ea9f5bc7dc25 model: doubao-1-5-lite-32k-250115 image-model: dab-official-text2image-v1 # 文生图模型名称 tts: # TTS 配置(项目:default;语音合成v3) appId: 8082193636 accessToken: nTp5pr10TFW1hb5LzZZfZcjjnu-HseX4 accessKey: I9noz2pmWLGjLtBys0WJr6V-yBAx_Z6z resourceId: seed-tts-2.0 baseUrl: https://openspeech.bytedance.com/api/v3/tts/unidirectional hunyuan: # 腾讯混元 enable: true api-key: sk-abc model: hunyuan-turbo siliconflow: # 硅基流动 enable: true api-key: sk-epsakfenqnyzoxhmbucsxlhkdqlcbnimslqoivkshalvdozz model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B xinghuo: # 讯飞星火 enable: true appKey: 75b161ed2aef4719b275d6e7f2a4d4cd secretKey: YWYxYWI2MTA4ODI2NGZlYTQyNjAzZTcz model: generalv3.5 baichuan: # 百川智能 enable: true api-key: sk-abc model: Baichuan4-Turbo midjourney: enable: true # base-url: https://api.holdai.top/mj-relax/mj base-url: https://api.holdai.top/mj api-key: sk-dZEPiVaNcT3FHhef51996bAa0bC74806BeAb620dA5Da10Bf notify-url: http://java.nat300.top/admin-api/ai/image/midjourney/notify suno: enable: true # base-url: https://suno-55ishh05u-status2xxs-projects.vercel.app base-url: http://127.0.0.1:3001 aliyun: # 阿里云(真实-使用中) enable: true tts: # TTS 配置 appKey: 4SUOF4LfaU7FekyW token: 20aa8ae2577b414db6c3cbbfcdc287be url: wss://nls-gateway-cn-beijing.aliyuncs.com/ws/v1 aliyunAkId: LTAI5tQhMPLXtSgXiPiWbw6D aliyunAkSecret: HCXpFYjl4swk0qwfIKa9s2bXx0AWcG --- #################### 博雅智算相关配置 #################### byzs: info: version: 1.0.0 base-package: cn.iocoder.byzs web: admin-ui: url: # Admin 管理后台 UI 的地址 web-client: connect-timeout: 30s # 连接超时时间 read-timeout: 2m # 读取超时时间 write-timeout: 1m # 写入超时时间 pool: max-connections: 100 # 最大连接数 max-idle-time: 2m # 最大空闲时间 max-life-time: 10m # 最大生命周期 retry: enabled: true # 启用重试 max-attempts: 3 # 最大重试次数 backoff: 500ms # 重试间隔时间 xss: enable: false exclude-urls: security: permit-all_urls: - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录 websocket: enable: true # websocket的开关 path: /infra/ws # 路径 sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq sender-rocketmq: topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group sender-rabbitmq: exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue sender-kafka: topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group swagger: title: 博雅智算快速开发平台 description: 提供管理后台、用户 App 的所有功能 version: ${byzs.info.version} url: ${byzs.web.admin-ui.url} email: xingyu4j@vip.qq.com license: MIT license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE codegen: base-package: ${byzs.info.base-package} db-schemas: ${spring.datasource.dynamic.datasource.master.name} front-type: 20 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类 vo-type: 10 # VO 的类型,参见 CodegenVOTypeEnum 枚举类 delete-batch-enable: true # 是否生成批量删除接口 unit-test-enable: false # 是否生成单元测试 tenant: # 多租户相关配置项 enable: true splice-urls: - /system/ ignore-urls: - /jmreport/* # 积木报表,无法携带租户编号 ignore-visit-urls: - /admin-api/system/user/profile/** - /admin-api/system/auth/** ignore-tables: - system_invite_code - system_user_web_expire_time ignore-caches: - user_role_ids - permission_menu_ids - oauth_client - notify_template - mail_account - mail_template - sms_template sms-code: # 短信验证码相关的配置项 expire-times: 10m send-frequency: 1m send-maximum-quantity-per-day: 10 begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 end-code: 9999 # 这里配置 9999 的原因是,测试方便。