11111
parent
39fc26d102
commit
86ad4e00cd
|
@ -11,18 +11,26 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
*/
|
||||
public class EngineConfig {
|
||||
|
||||
// public static final AtomicReference<String> executionMethodName = new AtomicReference<>("run");
|
||||
public static final AtomicReference<String> executionMethodName = new AtomicReference<>("run");
|
||||
|
||||
/**
|
||||
* 包名称
|
||||
*/
|
||||
private String pack = "com.muyu.rule.server.basic.engine.value.";
|
||||
private String pack = "com/muyu/rule/server/basic/engine/value/";
|
||||
//private String pack = "com.muyu.rule.server.engine.";
|
||||
|
||||
// E:\\临时\\2024年8月23日\\
|
||||
/**
|
||||
* 本地目录名称
|
||||
*/
|
||||
private String location = "home/";
|
||||
// private String location = "E:\\practical_training\\cloud-etl-rule\\cloud-rule-server\\src\\main\\java\\com\\muyu\\rule\\server\\engine\\";
|
||||
// private String location = "E:\\practical_training\\cloud-etl-rule\\cloud-rule-server\\src\\main\\java\\com\\muyu\\rule\\server\\engine\\";
|
||||
|
||||
/**
|
||||
* 服务器目录
|
||||
* @return
|
||||
*/
|
||||
private String location = "home/";
|
||||
|
||||
public String getPack() {
|
||||
return pack;
|
||||
|
|
|
@ -52,26 +52,36 @@ public class OSSClassLoaderExample {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
// Class<?> aClass = null;
|
||||
// try {
|
||||
// aClass = Class.forName("com.muyu.rule.server.basic.engine.value.ENGINE_phone_zzzzz_V9");
|
||||
//
|
||||
// BasicEngine<DataValue> object =(BasicEngine<DataValue>)aClass.newInstance();
|
||||
//
|
||||
// DataValue dataValue = DataValue.builder()
|
||||
// .type("String")
|
||||
// .label("姓名")
|
||||
// .key("name")
|
||||
// .value(null)
|
||||
// .build();
|
||||
// object.set(dataValue);
|
||||
//
|
||||
// object.execution();
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
test1();
|
||||
}
|
||||
|
||||
|
||||
public static void test1(){
|
||||
|
||||
Class<?> aClass = null;
|
||||
try {
|
||||
aClass = Class.forName("com.muyu.rule.server.basic.engine.value.ENGINE_phone_zzzzz_V9");
|
||||
|
||||
BasicEngine<DataValue> object =(BasicEngine<DataValue>)aClass.newInstance();
|
||||
|
||||
DataValue dataValue = DataValue.builder()
|
||||
.type("String")
|
||||
.label("姓名")
|
||||
.key("name")
|
||||
.value(null)
|
||||
.build();
|
||||
object.set(dataValue);
|
||||
|
||||
object.execution();
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.muyu.rule.server.basic.engine.value;
|
||||
|
||||
import com.muyu.rule.common.domain.DataValue;
|
||||
import com.muyu.rule.server.basic.abstracts.DataEngineValueActuator;
|
||||
|
||||
/**
|
||||
* @Author:张承志
|
||||
* @Package:com.muyu.rule.server.basic.engine
|
||||
* @Project:cloud-etl-rule
|
||||
* @name:ENGINE_phone_zzzzz_V9
|
||||
* @Date:2024/8/29 15:51
|
||||
*/
|
||||
public class ENGINE_phone_zzzzz_V9 extends DataEngineValueActuator {
|
||||
@Override
|
||||
public void run() {
|
||||
DataValue dataValue = get();
|
||||
if (dataValue.getValue() == null){
|
||||
System.out.println("数据为空");
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue