diff --git a/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java b/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java index f7e77a928e..3c6aa0889d 100644 --- a/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java +++ b/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java @@ -53,7 +53,6 @@ public class CommonUtil { public static List> getSubClass(String fileName) throws Exception { List> classes = new LinkedList<>(); - ResourcePatternResolver resourceLoader = new PathMatchingResourcePatternResolver(); if (StringUtil.isNotEmpty(fileName) && fileName.endsWith(".jar")) { fileName = fileName.substring(0, fileName.length() - 4); } diff --git a/frontend/src/business/components/settings/plugin/PluginConfig.vue b/frontend/src/business/components/settings/plugin/PluginConfig.vue index 427919870e..2bb41e14fa 100644 --- a/frontend/src/business/components/settings/plugin/PluginConfig.vue +++ b/frontend/src/business/components/settings/plugin/PluginConfig.vue @@ -91,7 +91,7 @@ export default { this.initPlugins(); }, handleView(row){ - this.$refs.scriptView.open(row.pluginId); + this.$refs.scriptView.open(row.scriptId); }, handleDelete(id) { this.$confirm(this.$t('api_test.jar_config.delete_tip'), '', { diff --git a/frontend/src/business/components/settings/plugin/ScriptView.vue b/frontend/src/business/components/settings/plugin/ScriptView.vue index 8843de22ef..bbdcea86b6 100644 --- a/frontend/src/business/components/settings/plugin/ScriptView.vue +++ b/frontend/src/business/components/settings/plugin/ScriptView.vue @@ -45,8 +45,12 @@ export default { getPlugin(id) { if (id) { this.$get('/plugin/get/' + id, response => { - this.plugin = response.data; - this.reload(); + if (response.data) { + this.plugin = response.data; + this.reload(); + } else { + this.$warning("未找到脚本内容"); + } }); } },