mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
refactor(项目管理): 环境的配置增加压缩
This commit is contained in:
parent
ee540168f3
commit
bbb217e2c5
@ -639,8 +639,7 @@ INSERT INTO project_application (`project_id`, `type`, `type_value`) VALUES ('10
|
||||
|
||||
-- 初始化默认项目mock环境
|
||||
INSERT INTO environment (`id`, `project_id`, `name`, `create_user`, `create_time`, `update_user`, `update_time`, `mock`,`pos`) VALUES (UUID_SHORT(), '100001100001', 'Mock环境', 'admin', unix_timestamp() * 1000, 'admin', unix_timestamp() * 1000, true, 5000);
|
||||
INSERT INTO environment_blob (id,config)
|
||||
VALUES ((SELECT id FROM environment where name = 'Mock环境') ,CONVERT('{"commonParams":{"requestTimeout":600000,"responseTimeout":600000},"commonVariables":[],"httpConfig":[{"protocol":"HTTP","hostname":"http://127.0.0.1:8081/mock-server/100001","type":"NONE","pathMatchRule":{"condition":null,"path":null},"moduleMatchRule":{"modules":[]},"headers":[],"description":null,"order":0,"moduleMatchRuleOrder":2}],"dataSources":[],"hostConfig":{"enable":null,"hosts":[]},"authConfig":{"username":null,"password":null,"verification":null,"sslConfig":{"entry":null,"files":null,"defaultAlias":null}},"preProcessorConfig":{"apiProcessorConfig":{"planProcessorConfig":{"processors":[]},"scenarioProcessorConfig":{"processors":[]},"requestProcessorConfig":{"processors":[]}}},"postProcessorConfig":{"apiProcessorConfig":{"planProcessorConfig":{"processors":[]},"scenarioProcessorConfig":{"processors":[]},"requestProcessorConfig":{"processors":[]}}},"assertionConfig":{"assertions":[]},"pluginConfigMap":{}}' USING UTF8));
|
||||
INSERT INTO environment_blob (id,config) VALUES ((SELECT id FROM environment where name = 'Mock环境'), 0x504B030414000808080089706858000000000000000000000000030000007A6970CD52CB4EC33010FC179FD3A62D02A1DC1042E2D287A0E282382C8ED358385EE3475155E5DF5937711BA0121CE9293B3B3B3BB3EE9E716C1AD42BB0D03856EC9915EF4138BF968DC0E059713589BF8C7067503BF1ADD166BDC2135809AF4A90C8F34BC66AEFCD2DEA4A6EA8DE3359B24207A532662C7AE4A858C1EED7EB15232A3AAFA11184C42957E479E346DB8B7125FD8C2B0CE59856E40DF2B79113762B6C3E9D4CA6D79734EB7726CE2D968B3BAA0CF87A0E9ED70F41891886A32EA597A88FDB89D17D93F1064BE27D19E8A0430622D4024A61FB44A570DC4A3354434B6D564C7E482DBBC6AC8D73E0E11183E5C7D350DE749A3D133A5E2D29C65EDA0EC1D7275EA0E8DD955212E73EC840AAE92CB2921C86FE9C53C345DEEE52A79287945D518A0A82F2374A428FB56D7C28B1B248AE1DDA930A187906350AF43938412992E314D74AFC0BB7FF23FE4E3D98C5B3CC7FEA969E4ED8F85003A7094A8246858DEC097330C469DB4F504B0708C82FCAE869010000AE030000504B0102140014000808080089706858C82FCAE869010000AE0300000300000000000000000000000000000000007A6970504B05060000000001000100310000009A0100000000);
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
||||
|
@ -17,7 +17,6 @@ public class ApiTestInterceptor {
|
||||
// ApiDefinitionBlob
|
||||
configList.add(new MybatisInterceptorConfig(ApiDefinitionBlob.class, "request", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(ApiDefinitionBlob.class, "response", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(ApiDefinitionBlob.class, "remark", CompressUtils.class, "zip", "unzip"));
|
||||
// ApiDefinitionMockConfig
|
||||
configList.add(new MybatisInterceptorConfig(ApiDefinitionMockConfig.class, "matching", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(ApiDefinitionMockConfig.class, "response", CompressUtils.class, "zip", "unzip"));
|
||||
@ -34,6 +33,10 @@ public class ApiTestInterceptor {
|
||||
configList.add(new MybatisInterceptorConfig(ApiScenarioReportDetail.class, "content", CompressUtils.class, "zip", "unzip"));
|
||||
// ApiScenarioReportLog
|
||||
configList.add(new MybatisInterceptorConfig(ApiScenarioReportLog.class, "console", CompressUtils.class, "zip", "unzip"));
|
||||
// ApiDebugBlob
|
||||
configList.add(new MybatisInterceptorConfig(ApiDebugBlob.class, "request", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(ApiDebugBlob.class, "response", CompressUtils.class, "zip", "unzip"));
|
||||
|
||||
return configList;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.metersphere.system.config.interceptor;
|
||||
|
||||
import io.metersphere.project.domain.CustomFunctionBlob;
|
||||
import io.metersphere.project.domain.FileModuleRepository;
|
||||
import io.metersphere.sdk.domain.EnvironmentBlob;
|
||||
import io.metersphere.sdk.util.CompressUtils;
|
||||
import io.metersphere.sdk.util.EncryptUtils;
|
||||
import io.metersphere.system.utils.MybatisInterceptorConfig;
|
||||
@ -21,6 +22,7 @@ public class ProjectInterceptor {
|
||||
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "script", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "result", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "params", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(EnvironmentBlob.class, "config", CompressUtils.class, "zip", "unzip"));
|
||||
|
||||
return configList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user