feat: 增加通知系统、RabbitMQ集成及Docker一键部署脚本
All checks were successful
test/timeline-server/pipeline/head This commit looks good

1. 新增通知中心功能,支持好友请求、评论、点赞等多种通知类型的持久化与推送
2. 集成 RabbitMQ 用于异步处理动态日志,解耦动态服务与日志记录逻辑
3. 提供完整的 Docker Compose 部署方案及一键启动/停止脚本(Shell/Bat)
4. 优化文件服务,增加图片上传时的自动压缩处理以节省存储空间
5. 增强动态服务,支持通过 shareId 公开访问动态项及关键词搜索功能
6. 完善代码健壮性,在关键业务 Service 层增加 @Transactional 事务控制
This commit is contained in:
2026-02-11 14:28:27 +08:00
parent 35f3959474
commit 482c32a59c
77 changed files with 2396 additions and 646 deletions

View File

@@ -245,10 +245,18 @@ public class FileServiceImpl implements FileService {
log.info("当前文件已存在不进行minio文件上传");
} else {
// 1. 上传到 MinIO
// 对原图进行压缩
ByteArrayOutputStream compressedOutputStream = new ByteArrayOutputStream();
Thumbnails.of(image.getInputStream())
.scale(1.0) // 保持原图尺寸
.outputQuality(0.8) // 设置压缩质量
.toOutputStream(compressedOutputStream);
ByteArrayInputStream compressedInputStream = new ByteArrayInputStream(compressedOutputStream.toByteArray());
minioClient.putObject(PutObjectArgs.builder()
.bucket(bucket)
.object(objectKey)
.stream(image.getInputStream(), image.getSize(), -1)
.stream(compressedInputStream, compressedInputStream.available(), -1)
.contentType(image.getContentType())
.build());
// 生成并上传低分辨率版本