refactor(config): 下移 AI、flowable 与上传限制到各 profile

- 各 profile 分别声明 spring.ai.model、flowable 与 spring.servlet.multipart
- application.yml 只保留应用名、激活的 profile 与配置导入
This commit is contained in:
Ray.Hao
2026-10-01 13:25:49 +08:00
parent 1e089cfe08
commit 3cd2cf983a
3 changed files with 45 additions and 28 deletions

View File

@@ -53,6 +53,12 @@ spring:
# 装配开关:none 关闭,openai 启用
model:
chat: none
embedding: none
image: none
moderation: none
audio:
speech: none
transcription: none
# 启用后在此填写模型凭据与名称
openai:
# 厂商接口地址(OpenAI 兼容根地址)
@@ -68,6 +74,11 @@ spring:
# 百炼私有参数:推理模型的思考内容耗时可占整次调用的大头,false 关闭
extra-body:
enable_thinking: false
servlet:
multipart:
# 单文件大小上限,单一来源绑定 storage.upload.max-file-size
max-file-size: ${storage.upload.max-file-size:50MB}
max-request-size: ${storage.upload.max-file-size:50MB}
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
global-config:
@@ -262,3 +273,16 @@ workflow:
demo:
# 演示流程自动部署开关
enabled: true
# 工作流引擎
flowable:
# 流程引擎跟随业务开关 workflow.enabled
process:
enabled: ${workflow.enabled:false}
# 用户与角色走系统自有体系(sys_user/sys_role),不启用 Flowable IDM 与事件注册表
idm:
enabled: false
eventregistry:
enabled: false
# 引擎表初始化策略,true 启动时检查并自动建/更新 ACT_* 表;可选 true/false/create/create-drop
database-schema-update: true

View File

@@ -53,6 +53,12 @@ spring:
# 装配开关:none 关闭,openai 启用
model:
chat: none
embedding: none
image: none
moderation: none
audio:
speech: none
transcription: none
# 启用后在此填写模型凭据与名称
openai:
# 厂商接口地址(OpenAI 兼容根地址)
@@ -68,6 +74,11 @@ spring:
# 百炼私有参数:推理模型的思考内容耗时可占整次调用的大头,false 关闭
extra-body:
enable_thinking: false
servlet:
multipart:
# 单文件大小上限,单一来源绑定 storage.upload.max-file-size
max-file-size: ${storage.upload.max-file-size:50MB}
max-request-size: ${storage.upload.max-file-size:50MB}
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
global-config:
@@ -262,6 +273,15 @@ workflow:
# 演示流程自动部署开关
enabled: false
# 工作流引擎
flowable:
# 引擎表初始化策略,false 要求 ACT_* 表已存在
# 流程引擎跟随业务开关 workflow.enabled
process:
enabled: ${workflow.enabled:false}
# 用户与角色走系统自有体系(sys_user/sys_role),不启用 Flowable IDM 与事件注册表
idm:
enabled: false
eventregistry:
enabled: false
# 引擎表初始化策略,true 启动时检查并自动建/更新 ACT_* 表;可选 true/false/create/create-drop
database-schema-update: false

View File

@@ -6,30 +6,3 @@ spring:
config:
# 引入代码生成模块的配置(数据源、表前缀等),由 codegen.yml 提供
import: classpath:codegen.yml
servlet:
multipart:
# 单文件大小上限,取自 storage.upload.max-file-size(单一来源)
max-file-size: ${storage.upload.max-file-size:50MB}
max-request-size: ${storage.upload.max-file-size:50MB}
# 项目只用对话模型,其余类型关闭自动装配,否则未配置密钥时启动就要求凭据
ai:
model:
embedding: none
image: none
moderation: none
audio:
speech: none
transcription: none
# 工作流引擎(业务开关 workflow.enabled 在 application-{profile}.yml)
flowable:
# 流程引擎跟随业务开关
process:
enabled: ${workflow.enabled:false}
# 用户与角色走系统自有体系(sys_user/sys_role),不启用 Flowable IDM 与事件注册表
idm:
enabled: false
eventregistry:
enabled: false
# 引擎表初始化策略,true 启动时检查并自动建/更新 ACT_* 表;可选 true/false/create/create-drop
database-schema-update: true