11111
parent
39fc26d102
commit
86ad4e00cd
|
@ -11,19 +11,27 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
*/
|
*/
|
||||||
public class EngineConfig {
|
public class EngineConfig {
|
||||||
|
|
||||||
|
// public static final AtomicReference<String> executionMethodName = new AtomicReference<>("run");
|
||||||
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日\\
|
// 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() {
|
public String getPack() {
|
||||||
return pack;
|
return pack;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,26 +52,36 @@ public class OSSClassLoaderExample {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class<?> aClass = null;
|
test1();
|
||||||
// try {
|
}
|
||||||
// aClass = Class.forName("com.muyu.rule.server.basic.engine.value.ENGINE_phone_zzzzz_V9");
|
|
||||||
//
|
|
||||||
// BasicEngine<DataValue> object =(BasicEngine<DataValue>)aClass.newInstance();
|
public static void test1(){
|
||||||
//
|
|
||||||
// DataValue dataValue = DataValue.builder()
|
Class<?> aClass = null;
|
||||||
// .type("String")
|
try {
|
||||||
// .label("姓名")
|
aClass = Class.forName("com.muyu.rule.server.basic.engine.value.ENGINE_phone_zzzzz_V9");
|
||||||
// .key("name")
|
|
||||||
// .value(null)
|
BasicEngine<DataValue> object =(BasicEngine<DataValue>)aClass.newInstance();
|
||||||
// .build();
|
|
||||||
// object.set(dataValue);
|
DataValue dataValue = DataValue.builder()
|
||||||
//
|
.type("String")
|
||||||
// object.execution();
|
.label("姓名")
|
||||||
//
|
.key("name")
|
||||||
// } catch (Exception e) {
|
.value(null)
|
||||||
// throw new RuntimeException(e);
|
.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