perf(backend+frontend): 列表API响应体积优化 3.1MB→145KB (↓95.4%)
- 后端: JPQL构造器投影排除LONGTEXT大字段(uploadedImages/videoReferenceImages) - 后端: DTO层过滤非分镜图类型的base64内联resultUrl - 前端: 列表缩略图从video改为img loading=lazy,消除172并发请求 - 前端: download函数增加resultUrl懒加载(详情接口兜底) - 文档: 新增性能优化报告 docs/performance-optimization-report.md
This commit is contained in:
109
src/main/java/com/example/demo/config/TencentCloudConfig.java
Normal file
109
src/main/java/com/example/demo/config/TencentCloudConfig.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package com.example.demo.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 腾讯云配置类
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "tencent.cloud")
|
||||
public class TencentCloudConfig {
|
||||
|
||||
/**
|
||||
* 腾讯云SecretId
|
||||
*/
|
||||
private String secretId;
|
||||
|
||||
/**
|
||||
* 腾讯云SecretKey
|
||||
*/
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 邮件推送服务配置
|
||||
*/
|
||||
private SesConfig ses = new SesConfig();
|
||||
|
||||
/**
|
||||
* 邮件推送服务配置
|
||||
*/
|
||||
public static class SesConfig {
|
||||
/**
|
||||
* 邮件服务地域
|
||||
*/
|
||||
private String region = "ap-beijing";
|
||||
|
||||
/**
|
||||
* 发件人邮箱
|
||||
*/
|
||||
private String fromEmail;
|
||||
|
||||
/**
|
||||
* 发件人名称
|
||||
*/
|
||||
private String fromName;
|
||||
|
||||
/**
|
||||
* 验证码邮件模板ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public String getFromEmail() {
|
||||
return fromEmail;
|
||||
}
|
||||
|
||||
public void setFromEmail(String fromEmail) {
|
||||
this.fromEmail = fromEmail;
|
||||
}
|
||||
|
||||
public String getFromName() {
|
||||
return fromName;
|
||||
}
|
||||
|
||||
public void setFromName(String fromName) {
|
||||
this.fromName = fromName;
|
||||
}
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
}
|
||||
|
||||
public String getSecretId() {
|
||||
return secretId;
|
||||
}
|
||||
|
||||
public void setSecretId(String secretId) {
|
||||
this.secretId = secretId;
|
||||
}
|
||||
|
||||
public String getSecretKey() {
|
||||
return secretKey;
|
||||
}
|
||||
|
||||
public void setSecretKey(String secretKey) {
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
|
||||
|
||||
public SesConfig getSes() {
|
||||
return ses;
|
||||
}
|
||||
|
||||
public void setSes(SesConfig ses) {
|
||||
this.ses = ses;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user