Merge branch 'dev' of https://gitee.com/dromara/liteFlow into issue/#I8MW6Q-2

This commit is contained in:
Dale Lee
2024-01-17 21:24:59 +08:00
112 changed files with 366 additions and 237 deletions

View File

@@ -26,7 +26,7 @@ import javax.annotation.Resource;
@TestPropertySource(value = "classpath:/common/application.properties")
@SpringBootTest(classes = ScriptPythonCommonELTest.class)
@EnableAutoConfiguration
@ComponentScan({ "com.yomahub.liteflow.test.script.python.common.cmp" })
@ComponentScan({ "com.yomahub.liteflow.test.script.python.common.cmp","com.yomahub.liteflow.test.script.python.common.domain" })
public class ScriptPythonCommonELTest extends BaseTest {
@Resource
@@ -40,6 +40,7 @@ public class ScriptPythonCommonELTest extends BaseTest {
Assertions.assertTrue(response.isSuccess());
Assertions.assertEquals(Integer.valueOf(30), context.getData("s1"));
Assertions.assertEquals("杰克", context.getData("name"));
Assertions.assertEquals("hi,jack", context.getData("td"));
}
}

View File

@@ -0,0 +1,13 @@
package com.yomahub.liteflow.test.script.python.common.domain;
import com.yomahub.liteflow.script.annotation.ScriptBean;
import org.springframework.stereotype.Component;
@Component
@ScriptBean("td")
public class TestDomain {
public String sayHi(String name){
return "hi," + name;
}
}