feat: 接口字段补 @Schema 中文说明 + 精简冗余字段 + 接入 Prometheus 监控
- 全部 VO 字段补 @Schema(description) 中文说明,在线文档字段可读 - AppEpisodeVO 精简 duration/isFree 冗余字段(保留 durationSec/locked) - framework 引入 actuator + micrometer-registry-prometheus - SecurityConfig 放行 /actuator/prometheus,双服务配置 management 暴露指标 - 新增 deploy/docker-compose.yml + prometheus.yml 监控部署配置
This commit is contained in:
1 parent
efe8af6c9b
commit
5f9483a86c
140 files changed
+1357
-19
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.media.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,16 +11,26 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class MediaAssetRespVO {
|
||||
|
||||
@Schema(description = "媒资 ID")
|
||||
private Long id;
|
||||
@Schema(description = "业务类型")
|
||||
private String bizType;
|
||||
@Schema(description = "文件名")
|
||||
private String fileName;
|
||||
@Schema(description = "对象存储键")
|
||||
private String objectKey;
|
||||
@Schema(description = "地址")
|
||||
private String url;
|
||||
@Schema(description = "文件大小(字节)")
|
||||
private Long sizeBytes;
|
||||
@Schema(description = "MD5 校验值")
|
||||
private String md5;
|
||||
@Schema(description = "时长(秒)")
|
||||
private Integer durationSec;
|
||||
@Schema(description = "状态")
|
||||
private String status;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
+3
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.media.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -9,8 +10,10 @@ import lombok.Data;
|
||||
public class UploadCompleteReqVO {
|
||||
|
||||
@NotBlank(message = "缺少 uploadId")
|
||||
@Schema(description = "上传 ID")
|
||||
private String uploadId;
|
||||
|
||||
/** 客户端探测到的时长(视频用) */
|
||||
@Schema(description = "时长(秒)")
|
||||
private Integer durationSec;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.media.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import lombok.Data;
|
||||
@@ -10,14 +11,18 @@ import lombok.Data;
|
||||
public class UploadInitReqVO {
|
||||
|
||||
@NotBlank(message = "缺少文件名")
|
||||
@Schema(description = "文件名")
|
||||
private String fileName;
|
||||
|
||||
@Positive(message = "文件大小不合法")
|
||||
@Schema(description = "文件大小")
|
||||
private long fileSize;
|
||||
|
||||
/** DRAMA_COVER / EPISODE / AVATAR */
|
||||
@Schema(description = "业务类型")
|
||||
private String bizType = "EPISODE";
|
||||
|
||||
/** 客户端期望的分片大小,留空则用服务端配置 */
|
||||
@Schema(description = "分片大小")
|
||||
private Long chunkSize;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.media.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -9,8 +10,12 @@ import lombok.Data;
|
||||
@AllArgsConstructor
|
||||
public class UploadInitRespVO {
|
||||
|
||||
@Schema(description = "上传 ID")
|
||||
private String uploadId;
|
||||
@Schema(description = "分片大小")
|
||||
private long chunkSize;
|
||||
@Schema(description = "总分片数")
|
||||
private int totalChunks;
|
||||
@Schema(description = "对象存储键")
|
||||
private String objectKey;
|
||||
}
|
||||
+12
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.media.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -12,18 +13,29 @@ import lombok.Data;
|
||||
@Data
|
||||
public class UploadProgressRespVO {
|
||||
|
||||
@Schema(description = "上传 ID")
|
||||
private String uploadId;
|
||||
@Schema(description = "文件名")
|
||||
private String fileName;
|
||||
@Schema(description = "业务类型")
|
||||
private String bizType;
|
||||
@Schema(description = "文件大小")
|
||||
private Long fileSize;
|
||||
@Schema(description = "分片大小")
|
||||
private Integer chunkSize;
|
||||
@Schema(description = "总分片数")
|
||||
private Integer totalChunks;
|
||||
@Schema(description = "已收分片数")
|
||||
private Integer receivedChunks;
|
||||
/** 0-100,按已收分片 / 总分片计算 */
|
||||
@Schema(description = "进度百分比(0-100)")
|
||||
private Integer percent;
|
||||
/** uploading / completed */
|
||||
@Schema(description = "状态")
|
||||
private String status;
|
||||
/** 合并完成后才有 */
|
||||
@Schema(description = "媒资 ID")
|
||||
private Long assetId;
|
||||
@Schema(description = "地址")
|
||||
private String url;
|
||||
}
|
||||
Reference in new issue
Block a user