Browse Source
1) 规则引擎中,增加 Java 执行引擎 2) 规则引擎中,模型定义中,将参数附加属性中的枚举值变量替换成常量 3) 规则引擎中,模型定义中,将参数选项属性中的枚举值变量替换成常量main
4 changed files with 23 additions and 6 deletions
@ -0,0 +1,17 @@ |
|||||
|
package io.sc.engine.rule.client.test; |
||||
|
|
||||
|
import io.sc.engine.rule.client.runtime.impl.groovy.GroovyScriptExecutor; |
||||
|
import io.sc.platform.util.FileUtil; |
||||
|
|
||||
|
import javax.script.CompiledScript; |
||||
|
import java.io.FileInputStream; |
||||
|
|
||||
|
public class TestGroovy { |
||||
|
public static void main(String[] args) throws Exception { |
||||
|
String file ="/Users/wangshaoping/wspsc/workspace/wangshaoping/v8/platform/io.sc.engine.rule.client/src/test/resources/a.txt"; |
||||
|
String content = FileUtil.readString(new FileInputStream(file)); |
||||
|
GroovyScriptExecutor executor =new GroovyScriptExecutor(); |
||||
|
CompiledScript compiledScript =executor.getCompiledScript(content); |
||||
|
System.out.println(compiledScript.getClass().getName()); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue