refactor(config): 重构配置文件以支持生产环境部署

- 将API配置从application.yml迁移至application-dev.yml和application-prod.yml
- 更新生产环境数据库连接地址为192.168.0.222
- 修改服务器端口从13082调整为13080
- 配置redis连接参数,包括host、port、database及password
- 更新minio配置,指定新的url、accessKey、secretKey和bucketName
- 添加devtools热部署开关配置
- 完善gRPC客户端配置,设定address、enableKeepAlive等属性
- 在生产环境中添加完整的api相关配置项,包含app-id、app-key等信息
This commit is contained in:
lixiaolong 2025-12-03 10:23:36 +08:00
parent 6b3b286e25
commit f86e9aa64f
3 changed files with 132 additions and 79 deletions

View File

@ -106,3 +106,17 @@ grpc:
enableKeepAlive: true enableKeepAlive: true
keepAliveWithoutCalls: true keepAliveWithoutCalls: true
negotiationType: plaintext # 明文传输 negotiationType: plaintext # 明文传输
api:
app-id: d0epfibvo3em6c4iul40
app-key: d0eqt1kqek3vg7g4ofi0
work-flow-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/run_app_workflow
query-result-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/query_run_app_process
bge-vl: http://192.168.1.8:5000/search_similar
generate_advanced_audio: http://192.168.0.102:9003/generate_advanced_audio
# 智能体应用id和秘钥
# ActionEnum 的枚举作为 key
agents:
INTENT_RECOGNITION: # 意图识别
app-id: d3c98sp0gdon0fcf6l00
app-key: d3c98vp0gdon0fcf6n20

View File

@ -1,6 +1,6 @@
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
port: 13082 port: 13080
# 数据源配置 # 数据源配置
spring: spring:
datasource: datasource:
@ -9,7 +9,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://10.148.20.35:3306/cmvr-iot-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://192.168.0.222:3306/cmvr-iot-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: cmvr-iot username: cmvr-iot
password: cmvr-iot123456 password: cmvr-iot123456
# 从库数据源 # 从库数据源
@ -62,10 +62,61 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true multi-statement-allow: true
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: 192.168.0.222
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: cmvr2468
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池:中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# Minio配置 # Minio配置
minio: minio:
url: http://localhost:9000 url: http://192.168.0.222:9000
accessKey: minioadmin accessKey: AKICMVR
secretKey: minioadmin secretKey: wJalrXUtnFEMI
bucketName: ruoyi bucketName: cmvr-iot
# gRPC 客户端设置
grpc:
client:
grpc-server: # 自定义服务名
address: 'static://10.148.108.100:50051' # 调用 gRPC 的地址
# address: 'static://10.148.108.100:50051' # 调用 gRPC 的地址
enableKeepAlive: true
keepAliveWithoutCalls: true
negotiationType: plaintext # 明文传输
api:
app-id: d0epfibvo3em6c4iul40
app-key: d0eqt1kqek3vg7g4ofi0
work-flow-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/run_app_workflow
query-result-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/query_run_app_process
bge-vl: http://192.168.1.8:5000/search_similar
generate_advanced_audio: http://192.168.0.102:9003/generate_advanced_audio
# 智能体应用id和秘钥
# ActionEnum 的枚举作为 key
agents:
INTENT_RECOGNITION: # 意图识别
app-id: d3c98sp0gdon0fcf6l00
app-key: d3c98vp0gdon0fcf6n20

View File

@ -113,16 +113,4 @@ xss:
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*,/device/*,/test/*,/api/* urlPatterns: /system/*,/monitor/*,/tool/*,/device/*,/test/*,/api/*
api:
app-id: d0epfibvo3em6c4iul40
app-key: d0eqt1kqek3vg7g4ofi0
work-flow-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/run_app_workflow
query-result-url: https://aiagentplatform.cmft.com/api/proxy/api/v1/query_run_app_process
bge-vl: http://192.168.1.8:5000/search_similar
generate_advanced_audio: http://192.168.0.102:9003/generate_advanced_audio
# 智能体应用id和秘钥
# ActionEnum 的枚举作为 key
agents:
INTENT_RECOGNITION: # 意图识别
app-id: d3c98sp0gdon0fcf6l00
app-key: d3c98vp0gdon0fcf6n20