fix(接口测试): 接口服务启动时会清理平台插件
This commit is contained in:
parent
5026dca990
commit
275499002a
|
@ -6,6 +6,7 @@ import io.metersphere.base.domain.Plugin;
|
||||||
import io.metersphere.base.domain.PluginExample;
|
import io.metersphere.base.domain.PluginExample;
|
||||||
import io.metersphere.base.domain.PluginWithBLOBs;
|
import io.metersphere.base.domain.PluginWithBLOBs;
|
||||||
import io.metersphere.base.mapper.PluginMapper;
|
import io.metersphere.base.mapper.PluginMapper;
|
||||||
|
import io.metersphere.commons.constants.PluginScenario;
|
||||||
import io.metersphere.commons.utils.BeanUtils;
|
import io.metersphere.commons.utils.BeanUtils;
|
||||||
import io.metersphere.commons.utils.FileUtils;
|
import io.metersphere.commons.utils.FileUtils;
|
||||||
import io.metersphere.commons.utils.LogUtil;
|
import io.metersphere.commons.utils.LogUtil;
|
||||||
|
@ -63,6 +64,7 @@ public class PluginService {
|
||||||
public void loadPlugins() {
|
public void loadPlugins() {
|
||||||
try {
|
try {
|
||||||
PluginExample example = new PluginExample();
|
PluginExample example = new PluginExample();
|
||||||
|
example.createCriteria().andScenarioEqualTo(PluginScenario.api.name());
|
||||||
List<Plugin> plugins = pluginMapper.selectByExample(example);
|
List<Plugin> plugins = pluginMapper.selectByExample(example);
|
||||||
if (CollectionUtils.isNotEmpty(plugins)) {
|
if (CollectionUtils.isNotEmpty(plugins)) {
|
||||||
plugins = plugins.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()
|
plugins = plugins.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()
|
||||||
|
|
Loading…
Reference in New Issue