fix(接口测试): 接口服务启动时会清理平台插件

This commit is contained in:
chenjianxing 2022-11-23 11:05:19 +08:00 committed by fit2-zhao
parent 5026dca990
commit 275499002a
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import io.metersphere.base.domain.Plugin;
import io.metersphere.base.domain.PluginExample;
import io.metersphere.base.domain.PluginWithBLOBs;
import io.metersphere.base.mapper.PluginMapper;
import io.metersphere.commons.constants.PluginScenario;
import io.metersphere.commons.utils.BeanUtils;
import io.metersphere.commons.utils.FileUtils;
import io.metersphere.commons.utils.LogUtil;
@ -63,6 +64,7 @@ public class PluginService {
public void loadPlugins() {
try {
PluginExample example = new PluginExample();
example.createCriteria().andScenarioEqualTo(PluginScenario.api.name());
List<Plugin> plugins = pluginMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(plugins)) {
plugins = plugins.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()