From 1644493976c4920e73a2a6279ef6d1a76516f498 Mon Sep 17 00:00:00 2001 From: rain <672378783@qq.com> Date: Tue, 10 Oct 2023 20:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9D=E5=AF=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=8C=B9=E9=85=8D=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbsoluteConfigPathELDeclMultiSpringbootTest.java | 3 ++- .../AbsoluteConfigPathELDeclSpringbootTest.java | 5 ++++- .../test/absoluteConfigPath/AbsoluteConfigPathTest.java | 3 ++- .../AbsoluteConfigPathELSpringbootTest.java | 3 ++- .../AbsoluteConfigPathELSpringbootTest.java | 3 ++- .../absoluteConfigPath/AbsoluteConfigPathELSpringTest.java | 3 ++- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/liteflow-testcase-el/liteflow-testcase-el-declare-multi-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclMultiSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-declare-multi-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclMultiSpringbootTest.java index fd619cdf2..ba135a619 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-declare-multi-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclMultiSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-declare-multi-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclMultiSpringbootTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -64,7 +65,7 @@ public class AbsoluteConfigPathELDeclMultiSpringbootTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathELDeclMultiSpringbootTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir); diff --git a/liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclSpringbootTest.java index 1acd5c5f3..ae2393aed 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-declare-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELDeclSpringbootTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -8,6 +9,8 @@ import com.yomahub.liteflow.flow.LiteflowResponse; import com.yomahub.liteflow.property.LiteflowConfig; import com.yomahub.liteflow.property.LiteflowConfigGetter; import com.yomahub.liteflow.test.BaseTest; +import com.yomahub.liteflow.util.PathMatchUtil; +import org.apache.commons.collections.ListUtils; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; @@ -64,7 +67,7 @@ public class AbsoluteConfigPathELDeclSpringbootTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathELDeclSpringbootTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir); diff --git a/liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathTest.java b/liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathTest.java index 1cd83da4a..06e206679 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-nospring/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -51,7 +52,7 @@ public class AbsoluteConfigPathTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir); diff --git a/liteflow-testcase-el/liteflow-testcase-el-solon/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-solon/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java index 923126e18..62812c80b 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-solon/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-solon/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -57,7 +58,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathELSpringbootTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir); diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java index f036c48a5..674e77f35 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringbootTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -61,7 +62,7 @@ public class AbsoluteConfigPathELSpringbootTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathELSpringbootTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir); diff --git a/liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringTest.java b/liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringTest.java index 50aa12094..f44acb08a 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-springnative/src/test/java/com/yomahub/liteflow/test/absoluteConfigPath/AbsoluteConfigPathELSpringTest.java @@ -1,6 +1,7 @@ package com.yomahub.liteflow.test.absoluteConfigPath; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.StrUtil; import com.yomahub.liteflow.core.FlowExecutor; @@ -56,7 +57,7 @@ public class AbsoluteConfigPathELSpringTest extends BaseTest { @BeforeAll public static void createFiles() { - rootDir = Objects.requireNonNull(AbsoluteConfigPathELSpringTest.class.getResource("/")).getPath(); + rootDir = FileUtil.getAbsolutePath(ResourceUtil.getResource("").getPath()); String path1 = StrUtil.format("{}/sub/a", rootDir); String path2 = StrUtil.format("{}/sub/b", rootDir);