From 8d711dc3a2e77a4f4e2f50e53215c3b48e1e91d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Tue, 24 Feb 2026 11:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=9F=E8=BD=BD=E5=9D=87=E8=A1=A1=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E6=94=B9=E9=80=A0=EF=BC=8C=E5=A2=9E=E5=8A=A0redis?= =?UTF-8?q?=E3=80=81miniio=E7=AD=89=E5=9F=BA=E6=9C=AC=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 8 +- .../controller/ai/DocumentController.java | 67 ++++++++++------ .../controller/ai/FilePreviewController.java | 4 +- .../easyflow-common-file-storage/pom.xml | 8 ++ .../filestorage/impl/FileRecoderImpl.java | 52 +++++++++++-- .../impl/LocalFileStorageServiceImpl.java | 2 +- .../impl/XFIleStorageServiceImpl.java | 23 +++++- easyflow-starter/easyflow-starter-all/pom.xml | 4 + .../src/main/resources/application-prod.yml | 12 ++- .../src/main/resources/application.yml | 78 ++++++++++++++----- easyflow-ui-admin/scripts/deploy/nginx.conf | 44 ++++++++++- .../scripts/deploy/nginx.conf | 44 ++++++++++- pom.xml | 34 ++++++++ 13 files changed, 317 insertions(+), 63 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3179c94..9c0f327 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,9 +10,13 @@ services: - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/easyflow?useInformationSchema=true&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=123456 - - SPRING_REDIS_HOST=redis - - SPRING_REDIS_PASSWORD=${REDIS_PASSWORD:-easyflow_redis_2026} + - SERVER_PORT=8080 + - SPRING_DATA_REDIS_HOST=redis + - SPRING_DATA_REDIS_PORT=6379 + - SPRING_DATA_REDIS_PASSWORD=${REDIS_PASSWORD:-easyflow_redis_2026} + - SPRING_DATA_REDIS_DATABASE=0 - SPRING_WEB_RESOURCES_STATIC_LOCATIONS=file:/www/easyflow/attachment/ + - EASYFLOW_STORAGE_TYPE=local - EASYFLOW_STORAGE_LOCAL_ROOT=/www/easyflow/attachment networks: - easyflow-net diff --git a/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/DocumentController.java b/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/DocumentController.java index 5a70399..3968436 100644 --- a/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/DocumentController.java +++ b/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/DocumentController.java @@ -17,6 +17,7 @@ import tech.easyflow.ai.service.DocumentCollectionService; import tech.easyflow.ai.service.DocumentService; import tech.easyflow.ai.service.ModelService; import tech.easyflow.common.annotation.UsePermission; +import tech.easyflow.common.cache.RedisLockExecutor; import tech.easyflow.common.domain.Result; import tech.easyflow.common.tree.Tree; import tech.easyflow.common.util.RequestUtil; @@ -29,6 +30,7 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.math.BigInteger; +import java.time.Duration; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -44,14 +46,21 @@ import java.util.List; @UsePermission(moduleName = "/api/v1/documentCollection") public class DocumentController extends BaseCurdController { + private static final String DOCUMENT_ORDER_LOCK_KEY_PREFIX = "easyflow:lock:document:order:"; + private static final Duration LOCK_WAIT_TIMEOUT = Duration.ofSeconds(2); + private static final Duration LOCK_LEASE_TIMEOUT = Duration.ofSeconds(10); + private final DocumentCollectionService knowledgeService; @Autowired private DocumentService documentService; + @Autowired + private RedisLockExecutor redisLockExecutor; - @Value("${easyflow.storage.local.root}") + + @Value("${easyflow.storage.local.root:}") private String fileUploadPath; @@ -132,6 +141,7 @@ public class DocumentController extends BaseCurdController update(@JsonBody Document entity) { super.update(entity); @@ -158,28 +168,41 @@ public class DocumentController extends BaseCurdController list = service.list(QueryWrapper.create() - .eq(Document::getCollectionId, knowledgeId) - .orderBy(getDefaultOrderBy()) + Document current = service.getById(entity.getId()); + if (current == null) { + throw new BusinessException("文档不存在"); + } + BigInteger knowledgeId = current.getCollectionId(); + Integer targetOrderNo = orderNo; + + redisLockExecutor.executeWithLock( + DOCUMENT_ORDER_LOCK_KEY_PREFIX + knowledgeId, + LOCK_WAIT_TIMEOUT, + LOCK_LEASE_TIMEOUT, + () -> { + List list = service.list(QueryWrapper.create() + .eq(Document::getCollectionId, knowledgeId) + .orderBy(getDefaultOrderBy()) + ); + + list.removeIf(item -> item.getId().equals(entity.getId())); + if (targetOrderNo >= list.size()) { + list.add(entity); + } else { + list.add(targetOrderNo, entity); + } + + List updateList = new ArrayList<>(); + for (int i = 0; i < list.size(); i++) { + Document updateItem = new Document(); + updateItem.setId(list.get(i).getId()); + updateItem.setOrderNo(i); + updateList.add(updateItem); + } + + service.updateBatch(updateList); + } ); - - list.removeIf(item -> item.getId().equals(entity.getId())); - if (orderNo >= list.size()) { - list.add(entity); - } else { - list.add(orderNo, entity); - } - - List updateList = new ArrayList<>(); - for (int i = 0; i < list.size(); i++) { - Document updateItem = new Document(); - updateItem.setId(list.get(i).getId()); - updateItem.setOrderNo(i); - updateList.add(updateItem); - } - - service.updateBatch(updateList); } return true; diff --git a/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/FilePreviewController.java b/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/FilePreviewController.java index 403d963..c6d6b84 100644 --- a/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/FilePreviewController.java +++ b/easyflow-api/easyflow-api-admin/src/main/java/tech/easyflow/admin/controller/ai/FilePreviewController.java @@ -20,7 +20,7 @@ import java.nio.file.Files; public class FilePreviewController { // 定义图片存储的基础路径 - @Value("${easyflow.storage.local.root}") + @Value("${easyflow.storage.local.root:}") private String fileUploadPath; @SaIgnore @@ -70,4 +70,4 @@ public class FilePreviewController { throw new RuntimeException(e); } } -} \ No newline at end of file +} diff --git a/easyflow-commons/easyflow-common-file-storage/pom.xml b/easyflow-commons/easyflow-common-file-storage/pom.xml index 7be294d..e8a3482 100644 --- a/easyflow-commons/easyflow-common-file-storage/pom.xml +++ b/easyflow-commons/easyflow-common-file-storage/pom.xml @@ -33,6 +33,10 @@ cn.dev33 sa-token-spring-boot3-starter + + org.springframework.boot + spring-boot-starter-data-redis + com.squareup.okhttp3 @@ -53,6 +57,10 @@ org.apache.httpcomponents.client5 httpclient5 + + io.minio + minio + diff --git a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/FileRecoderImpl.java b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/FileRecoderImpl.java index 7821dc5..9d05d60 100644 --- a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/FileRecoderImpl.java +++ b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/FileRecoderImpl.java @@ -3,40 +3,82 @@ package tech.easyflow.common.filestorage.impl; import org.dromara.x.file.storage.core.FileInfo; import org.dromara.x.file.storage.core.recorder.FileRecorder; import org.dromara.x.file.storage.core.upload.FilePartInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.util.Date; /** - * 文件记录器 + * 文件记录器(基于 Redis 存储上传记录,满足多实例共享) */ @Service public class FileRecoderImpl implements FileRecorder { + + private static final Logger LOG = LoggerFactory.getLogger(FileRecoderImpl.class); + private static final String FILE_RECORD_KEY_PREFIX = "easyflow:xfile:record:"; + + @Autowired(required = false) + private RedisTemplate redisTemplate; + + private String buildKey(String url) { + return FILE_RECORD_KEY_PREFIX + url; + } + @Override public boolean save(FileInfo fileInfo) { + if (fileInfo == null || !StringUtils.hasText(fileInfo.getUrl())) { + return false; + } + if (fileInfo.getCreateTime() == null) { + fileInfo.setCreateTime(new Date()); + } + if (redisTemplate != null) { + redisTemplate.opsForValue().set(buildKey(fileInfo.getUrl()), fileInfo); + } return true; } @Override public void update(FileInfo fileInfo) { - + save(fileInfo); } @Override public FileInfo getByUrl(String url) { + if (!StringUtils.hasText(url) || redisTemplate == null) { + return null; + } + Object value = redisTemplate.opsForValue().get(buildKey(url)); + if (value == null) { + return null; + } + if (value instanceof FileInfo) { + return (FileInfo) value; + } + LOG.warn("FileInfo redis记录类型异常,url={}, class={}", url, value.getClass().getName()); return null; } @Override public boolean delete(String url) { - return true; + if (!StringUtils.hasText(url) || redisTemplate == null) { + return false; + } + Boolean deleted = redisTemplate.delete(buildKey(url)); + return Boolean.TRUE.equals(deleted); } @Override public void saveFilePart(FilePartInfo filePartInfo) { - + // 当前业务未使用手动分片上传,不做持久化 } @Override public void deleteFilePartByUploadId(String uploadId) { - + // 当前业务未使用手动分片上传,不做持久化 } } diff --git a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/LocalFileStorageServiceImpl.java b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/LocalFileStorageServiceImpl.java index 205d9eb..95def71 100644 --- a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/LocalFileStorageServiceImpl.java +++ b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/LocalFileStorageServiceImpl.java @@ -25,7 +25,7 @@ public class LocalFileStorageServiceImpl implements FileStorageService { @Value("${easyflow.storage.local.root:}") private String root; - @Value("${easyflow.storage.local.prefix}") + @Value("${easyflow.storage.local.prefix:}") private String prefix; @EventListener(ApplicationReadyEvent.class) diff --git a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/XFIleStorageServiceImpl.java b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/XFIleStorageServiceImpl.java index 3ebe277..5697b6f 100644 --- a/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/XFIleStorageServiceImpl.java +++ b/easyflow-commons/easyflow-common-file-storage/src/main/java/tech/easyflow/common/filestorage/impl/XFIleStorageServiceImpl.java @@ -5,6 +5,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; import tech.easyflow.common.filestorage.FileStorageService; import tech.easyflow.common.filestorage.utils.PathGeneratorUtil; @@ -22,17 +23,33 @@ public class XFIleStorageServiceImpl implements FileStorageService { @Override public String save(MultipartFile file) { + return save(file, null); + } + + @Override + public String save(MultipartFile file, String prePath) { + String uploadPath = PathGeneratorUtil.generateUserPath(""); + if (StringUtils.hasText(prePath)) { + String normalized = prePath.replaceAll("^/+", "").replaceAll("/+$", ""); + uploadPath = "/" + normalized + uploadPath; + } FileInfo fileInfo = fileStorageService.of(file) - .setPath(PathGeneratorUtil.generateUserPath("")) + .setPath(uploadPath) .setSaveFilename(file.getOriginalFilename()) .setContentType(getFileContentType(file)) .upload(); - return fileInfo == null ? "上传失败!" : fileInfo.getUrl(); + if (fileInfo == null || !StringUtils.hasText(fileInfo.getUrl())) { + throw new RuntimeException("文件上传失败"); + } + return fileInfo.getUrl(); } @Override public void delete(String path) { - fileStorageService.delete(path); + boolean deleted = fileStorageService.delete(path); + if (!deleted) { + LOG.warn("删除文件失败或文件不存在,path={}", path); + } } @Override diff --git a/easyflow-starter/easyflow-starter-all/pom.xml b/easyflow-starter/easyflow-starter-all/pom.xml index 1e85104..0508539 100644 --- a/easyflow-starter/easyflow-starter-all/pom.xml +++ b/easyflow-starter/easyflow-starter-all/pom.xml @@ -68,6 +68,10 @@ org.yaml snakeyaml + + org.springframework.boot + spring-boot-starter-actuator + diff --git a/easyflow-starter/easyflow-starter-all/src/main/resources/application-prod.yml b/easyflow-starter/easyflow-starter-all/src/main/resources/application-prod.yml index 9ea78cb..758c530 100644 --- a/easyflow-starter/easyflow-starter-all/src/main/resources/application-prod.yml +++ b/easyflow-starter/easyflow-starter-all/src/main/resources/application-prod.yml @@ -5,4 +5,14 @@ spring: datasource: url: jdbc:mysql://127.0.0.1:3306/easyflow?useInformationSchema=true&characterEncoding=utf-8 username: easyflow - password: 123456 \ No newline at end of file + password: 123456 + data: + redis: + host: 127.0.0.1 + port: 6379 + database: 0 + password: ${REDIS_PASSWORD:123456} + +easyflow: + storage: + type: xFileStorage diff --git a/easyflow-starter/easyflow-starter-all/src/main/resources/application.yml b/easyflow-starter/easyflow-starter-all/src/main/resources/application.yml index 77f3e24..0f15d92 100644 --- a/easyflow-starter/easyflow-starter-all/src/main/resources/application.yml +++ b/easyflow-starter/easyflow-starter-all/src/main/resources/application.yml @@ -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 \ No newline at end of file + enabled: true + +management: + endpoint: + health: + probes: + enabled: true + show-details: always + endpoints: + web: + exposure: + include: health,info diff --git a/easyflow-ui-admin/scripts/deploy/nginx.conf b/easyflow-ui-admin/scripts/deploy/nginx.conf index 3203b9e..11285b7 100644 --- a/easyflow-ui-admin/scripts/deploy/nginx.conf +++ b/easyflow-ui-admin/scripts/deploy/nginx.conf @@ -40,6 +40,17 @@ http { # text/javascript; #设置压缩的文件类型 # gzip_vary on; + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + # 如需多机负载均衡,在此增加多个后端地址 + upstream easyflow_api { + server easyflow-api:8080; + keepalive 64; + } + server { listen 8080; server_name localhost; @@ -60,20 +71,47 @@ http { } } - location /api/ { - proxy_pass http://easyflow-api:8080; + # WebSocket(语音链路) + location /api/v1/bot/ws/audio { + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + } + + # SSE/HTTP API + location /api/ { + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + proxy_cache off; } location /userCenter/ { - proxy_pass http://easyflow-api:8080; + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Connection ""; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + proxy_cache off; } error_page 500 502 503 504 /50x.html; diff --git a/easyflow-ui-usercenter/scripts/deploy/nginx.conf b/easyflow-ui-usercenter/scripts/deploy/nginx.conf index 3203b9e..11285b7 100644 --- a/easyflow-ui-usercenter/scripts/deploy/nginx.conf +++ b/easyflow-ui-usercenter/scripts/deploy/nginx.conf @@ -40,6 +40,17 @@ http { # text/javascript; #设置压缩的文件类型 # gzip_vary on; + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + # 如需多机负载均衡,在此增加多个后端地址 + upstream easyflow_api { + server easyflow-api:8080; + keepalive 64; + } + server { listen 8080; server_name localhost; @@ -60,20 +71,47 @@ http { } } - location /api/ { - proxy_pass http://easyflow-api:8080; + # WebSocket(语音链路) + location /api/v1/bot/ws/audio { + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + } + + # SSE/HTTP API + location /api/ { + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + proxy_cache off; } location /userCenter/ { - proxy_pass http://easyflow-api:8080; + proxy_pass http://easyflow_api; + proxy_http_version 1.1; + proxy_set_header Connection ""; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + proxy_cache off; } error_page 500 502 503 504 /50x.html; diff --git a/pom.xml b/pom.xml index 85ed8a3..1364f3d 100644 --- a/pom.xml +++ b/pom.xml @@ -33,12 +33,15 @@ 0.18.0 1.16.1 2.18.0 + 1.28.0 1.2.0 5.8.36 1.5.3 2.4 2.2.1 3.16.1 + 8.5.2 + 2.19.4 4.1.130.Final @@ -216,6 +219,26 @@ spring-boot-starter-validation ${spring-boot.version} + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + org.springframework.boot + spring-boot-starter-actuator + ${spring-boot.version} + com.alibaba @@ -247,6 +270,12 @@ ${commons-io.version} + + org.apache.commons + commons-compress + ${commons-compress.version} + + cn.idev.excel fastexcel @@ -420,6 +449,11 @@ aliyun-sdk-oss ${aliyun-oss.version} + + io.minio + minio + ${minio.version} + com.easyagents