build: 配置数据库大字段压缩

This commit is contained in:
guoyuqi 2023-05-26 15:30:44 +08:00 committed by 刘瑞斌
parent 31b474dde1
commit 9dfcbc603e
3 changed files with 36 additions and 2 deletions

View File

@ -98,7 +98,7 @@ public class UiCustomCommand implements Serializable {
@Schema(title = "指向初始版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "指向初始版本ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command.ref_id.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_custom_command.ref_id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 255, message = "{ui_custom_command.ref_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{ui_custom_command.ref_id.length_range}", groups = {Created.class, Updated.class})
private String refId; private String refId;
@Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "是否为最新版本 0:否1:是", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -22,7 +22,7 @@ public class UiCustomCommandModule implements Serializable {
@Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{ui_custom_command_module.name.not_blank}", groups = {Updated.class}) @NotBlank(message = "{ui_custom_command_module.name.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 64, message = "{ui_custom_command_module.name.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 255, message = "{ui_custom_command_module.name.length_range}", groups = {Created.class, Updated.class})
private String name; private String name;
@Schema(title = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -0,0 +1,34 @@
package io.metersphere.sdk.config.interceptor;
import io.metersphere.load.domain.*;
import io.metersphere.sdk.util.CompressUtils;
import io.metersphere.sdk.util.MybatisInterceptorConfig;
import io.metersphere.ui.domain.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
@Configuration
public class UiInterceptor {
@Bean
public List<MybatisInterceptorConfig> uiCompressConfigs() {
List<MybatisInterceptorConfig> configList = new ArrayList<>();
configList.add(new MybatisInterceptorConfig(UiCustomCommandBlob.class, "scenarioDefinition", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiCustomCommandBlob.class, "commandViewStruct", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioBlob.class, "scenarioDefinition", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioBlob.class, "environmentJson", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioReportDetail.class, "content", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioReportDetail.class, "baseInfo", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioReportLog.class, "console", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(UiScenarioReportStructure.class, "resourceTree", CompressUtils.class, "zip", "unzip"));
return configList;
}
}