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

This commit is contained in:
CaptainB 2023-05-26 11:21:05 +08:00
parent 5230734a8a
commit ca2fda14a6
3 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,39 @@
package io.metersphere.sdk.config.interceptor;
import io.metersphere.load.domain.*;
import io.metersphere.project.domain.*;
import io.metersphere.sdk.util.CompressUtils;
import io.metersphere.sdk.util.MybatisInterceptorConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
@Configuration
public class LoadTestInterceptor {
@Bean
public List<MybatisInterceptorConfig> projectCompressConfigs() {
List<MybatisInterceptorConfig> configList = new ArrayList<>();
configList.add(new MybatisInterceptorConfig(LoadTestBlob.class, "loadConfiguration", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestBlob.class, "advancedConfiguration", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestBlob.class, "envInfo", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportBlob.class, "loadConfiguration", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportBlob.class, "jmxContent", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportBlob.class, "advancedConfiguration", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportBlob.class, "envInfo", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportLog.class, "content", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportResult.class, "reportValue", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportResultPart.class, "reportValue", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(LoadTestReportResultRealtime.class, "reportValue", CompressUtils.class, "zip", "unzip"));
return configList;
}
}

View File

@ -10,7 +10,7 @@ import java.util.ArrayList;
import java.util.List;
@Configuration
public class ProjectCompressInterceptor {
public class ProjectInterceptor {
@Bean
public List<MybatisInterceptorConfig> projectCompressConfigs() {
List<MybatisInterceptorConfig> configList = new ArrayList<>();

View File

@ -10,7 +10,7 @@ import java.util.ArrayList;
import java.util.List;
@Configuration
public class SystemCompressInterceptor {
public class SystemInterceptor {
@Bean
public List<MybatisInterceptorConfig> systemCompressConfigs() {
List<MybatisInterceptorConfig> configList = new ArrayList<>();