From cbfbcb3d5fb3817f4f37739d1029fa49d70a8b05 Mon Sep 17 00:00:00 2001 From: yanyu34946 <875082356@qq.com> Date: Tue, 18 Apr 2023 09:44:53 +0800 Subject: [PATCH] =?UTF-8?q?bug=20#I6WGI3=20=E4=BF=AE=E5=A4=8DEL=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E6=97=A0=E6=B3=95=E8=A7=A3=E6=9E=90oracle=20?= =?UTF-8?q?url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liteflow/parser/helper/ParserHelper.java | 2 +- .../url/LiteflowNodeELSpringbootTest.java | 41 +++++++++++++++++++ .../yomahub/liteflow/test/url/cmp/ACmp.java | 26 ++++++++++++ .../yomahub/liteflow/test/url/cmp/BCmp.java | 23 +++++++++++ .../yomahub/liteflow/test/url/cmp/CCmp.java | 23 +++++++++++ .../test/resources/url/application.properties | 1 + .../src/test/resources/url/flow.el.xml | 19 +++++++++ 7 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/LiteflowNodeELSpringbootTest.java create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/ACmp.java create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/BCmp.java create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/CCmp.java create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/application.properties create mode 100644 liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/flow.el.xml diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java index 30513400d..983521d3e 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/parser/helper/ParserHelper.java @@ -253,7 +253,7 @@ public class ParserHelper { private static class RegexUtil { // java 注释的正则表达式 - private static final String REGEX_COMMENT = "(?b==>c==>b", "a==>b==>b==>c").contains(response.getExecuteStepStr())); + Assert.assertEquals("jdbc:oracle:thin:@//localhost:1521/USERS", str); + } + + +} \ No newline at end of file diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/ACmp.java b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/ACmp.java new file mode 100644 index 000000000..5aa2e3ae7 --- /dev/null +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/ACmp.java @@ -0,0 +1,26 @@ +/** + *
Title: liteflow
+ *Description: 轻量级的组件式流程框架
+ * @author Bryan.Zhang + * @email weenyc31@163.com + * @Date 2020/4/1 + */ +package com.yomahub.liteflow.test.url.cmp; + +import com.yomahub.liteflow.annotation.LiteflowMethod; +import com.yomahub.liteflow.core.NodeComponent; +import com.yomahub.liteflow.enums.LiteFlowMethodEnum; +import com.yomahub.liteflow.slot.DefaultContext; +import org.springframework.stereotype.Component; + +@Component("a") +public class ACmp { + + @LiteflowMethod(LiteFlowMethodEnum.PROCESS) + public void process(NodeComponent bindCmp) { + DefaultContext context = bindCmp.getFirstContextBean(); + context.setData("oracleUrl", bindCmp.getCmpData(String.class)); + System.out.println("ACmp executed!"); + } + +} diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/BCmp.java b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/BCmp.java new file mode 100644 index 000000000..e3e25703d --- /dev/null +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/BCmp.java @@ -0,0 +1,23 @@ +/** + *Title: liteflow
+ *Description: 轻量级的组件式流程框架
+ * @author Bryan.Zhang + * @email weenyc31@163.com + * @Date 2020/4/1 + */ +package com.yomahub.liteflow.test.url.cmp; + +import com.yomahub.liteflow.annotation.LiteflowMethod; +import com.yomahub.liteflow.core.NodeComponent; +import com.yomahub.liteflow.enums.LiteFlowMethodEnum; +import org.springframework.stereotype.Component; + +@Component("b") +public class BCmp { + + @LiteflowMethod(LiteFlowMethodEnum.PROCESS) + public void process(NodeComponent bindCmp) { + System.out.println("BCmp executed!"); + } + +} diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/CCmp.java b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/CCmp.java new file mode 100644 index 000000000..f053695e3 --- /dev/null +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/java/com/yomahub/liteflow/test/url/cmp/CCmp.java @@ -0,0 +1,23 @@ +/** + *Title: liteflow
+ *Description: 轻量级的组件式流程框架
+ * @author Bryan.Zhang + * @email weenyc31@163.com + * @Date 2020/4/1 + */ +package com.yomahub.liteflow.test.url.cmp; + +import com.yomahub.liteflow.annotation.LiteflowMethod; +import com.yomahub.liteflow.core.NodeComponent; +import com.yomahub.liteflow.enums.LiteFlowMethodEnum; +import org.springframework.stereotype.Component; + +@Component("c") +public class CCmp { + + @LiteflowMethod(LiteFlowMethodEnum.PROCESS) + public void process(NodeComponent bindCmp) { + System.out.println("CCmp executed!"); + } + +} diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/application.properties b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/application.properties new file mode 100644 index 000000000..c02b49cc5 --- /dev/null +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/application.properties @@ -0,0 +1 @@ +liteflow.rule-source=url/flow.el.xml \ No newline at end of file diff --git a/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/flow.el.xml b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/flow.el.xml new file mode 100644 index 000000000..d84afc373 --- /dev/null +++ b/liteflow-testcase-el/liteflow-testcase-el-springboot/src/test/resources/url/flow.el.xml @@ -0,0 +1,19 @@ + +