负载均衡基本改造,增加redis、miniio等基本中间件

This commit is contained in:
2026-02-24 11:16:03 +08:00
parent 26677972a6
commit 8d711dc3a2
13 changed files with 317 additions and 63 deletions

View File

@@ -68,6 +68,10 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -5,4 +5,14 @@ spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/easyflow?useInformationSchema=true&characterEncoding=utf-8
username: easyflow
password: 123456
password: 123456
data:
redis:
host: 127.0.0.1
port: 6379
database: 0
password: ${REDIS_PASSWORD:123456}
easyflow:
storage:
type: xFileStorage

View File

@@ -10,14 +10,24 @@ server:
enabled: true
charset: UTF-8 # 必须设置 UTF-8避免 WebFlux 流式返回AI 场景)会乱码问题
force: true
spring:
profiles:
active: dev
lifecycle:
timeout-per-shutdown-phase: 30s
datasource:
# 注意useInformationSchema=true 是必须的,用于支持 MyBatis-Flex 正确读取表注释。
url: jdbc:mysql://127.0.0.1:23306/easyflow?useInformationSchema=true&characterEncoding=utf-8
username: root
password: root
data:
redis:
host: 127.0.0.1
port: 6379
database: 0
password: ${REDIS_PASSWORD:123456}
timeout: 5s
servlet:
multipart:
max-file-size: 100MB
@@ -42,16 +52,23 @@ spring:
properties:
org:
quartz:
scheduler:
instanceName: easyflowScheduler
instanceId: AUTO
jobStore:
misfireThreshold: 1000
isClustered: true
clusterCheckinInterval: 15000
# 如果数据库大小写敏感可将ddl里的相关表名改为大写
tablePrefix: TB_QRTZ_
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
threadPool:
threadCount: 20
threadPriority: 5
threads:
virtual:
enabled: true
easyflow:
# 语音播放、识别服务(阿里云)
audio:
@@ -65,26 +82,30 @@ easyflow:
# 放行接口路径
excludes: /api/v1/auth/**, /static/**, /userCenter/auth/**, /userCenter/public/**
storage:
type: local # xFileStorage / local
# 本地文件存储配置
# local / xFileStorage
type: xFileStorage
# 本地文件存储配置(兼容保留,可作为回退)
local:
# 示例windows【C:\easyflow\attachment】 linux【/www/easyflow/attachment】
root: /Users/slience/postgraduate/easyflow/attachment
# 后端接口地址,用于拼接完整 url
prefix: http://localhost:8080/attachment
prefix: http://localhost:8111/attachment
# xFileStorage存储文件配置
# 文档https://x-file-storage.xuyanwu.cn/
dromara:
x-file-storage: #文件存储配置
default-platform: aliyun-oss-1 #默认使用的存储平台
aliyun-oss:
- platform: aliyun-oss-1 # 存储平台标识
enable-storage: true # 启用存储
access-key: yourAccessKeyId
secret-key: yourAccessKeySecret
end-point: yourEndpoint # 示例:https://oss-cn-beijing.aliyuncs.com
bucket-name: yourBucketName
domain: yourDomain # 访问域名,注意“/”结尾,例如:https://bucketname.oss-cn-shanghai.aliyuncs.com/
base-path: attachment # 基础路径
x-file-storage:
default-platform: minio-1
minio:
- platform: minio-1
enable-storage: true
access-key: ${MINIO_ACCESS_KEY:easyflowadmin}
secret-key: ${MINIO_SECRET_KEY:easyflowadmin123}
end-point: ${MINIO_ENDPOINT:http://127.0.0.1:9000}
bucket-name: ${MINIO_BUCKET:easyflow}
domain: ${MINIO_DOMAIN:http://127.0.0.1:9000/easyflow/}
base-path: attachment
# 自定义节点相关配置
node:
# 文件内容提取节点,默认使用简单文档读取器,可自行实现 ReadDocService
@@ -95,9 +116,10 @@ node:
# 搜索引擎节点 - 目前只支持博查搜索
bochaai:
apiKey: 'xxx'
jetcache:
# 缓存类型可选值local/remote/both CacheConfig 类初始化
cacheType: local
cacheType: remote
statIntervalMinutes: 15
areaInCacheName: false
local:
@@ -108,17 +130,18 @@ jetcache:
default:
type: redis
keyConvertor: fastjson2
broadcastChannel: projectA
broadcastChannel: easyflow-cache
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
host: 127.0.0.1
port: 6379
password: pwd
database: 0
host: ${spring.data.redis.host}
port: ${spring.data.redis.port}
password: ${spring.data.redis.password}
database: ${spring.data.redis.database}
# 多路召回搜索引擎配置
rag:
searcher:
@@ -130,6 +153,7 @@ rag:
userName: elastic
password: elastic
indexName: easyflow
logging:
file:
path: .logs/
@@ -137,10 +161,22 @@ logging:
level:
root: info
tech.easyflow.ai: debug
# 行为验证码配置
captcha:
# 初始化默认资源
init-default-resource: true
# 开启二次验证
secondary:
enabled: true
enabled: true
management:
endpoint:
health:
probes:
enabled: true
show-details: always
endpoints:
web:
exposure:
include: health,info