Changes
parent
8bbcc0882d
commit
66386f40c1
|
@ -15,7 +15,7 @@ VOLUME ["/home/logs/muyu-rule"]
|
||||||
#拷贝 执行 jar 包文件
|
#拷贝 执行 jar 包文件
|
||||||
COPY ./muyu-rule-server/target/muyu-rule.jar /home/app.jar
|
COPY ./muyu-rule-server/target/muyu-rule.jar /home/app.jar
|
||||||
|
|
||||||
COPY ./muyu-rule-server/target/classes/com/muyu /home/lib
|
COPY ./muyu-rule-common/target/classes/rule/ /home/lib/rule/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package rule.util;
|
package rule.util;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import rule.domain.Rule;
|
import rule.domain.Rule;
|
||||||
import rule.domain.RuleEdition;
|
import rule.domain.RuleEdition;
|
||||||
|
|
||||||
|
@ -14,9 +15,9 @@ public class GenerateConstant {
|
||||||
public static final String DATA_FIELD = "DataEngineValueActuator";
|
public static final String DATA_FIELD = "DataEngineValueActuator";
|
||||||
public static final String DATA_RECORD = "DataEngineRecordActuator";
|
public static final String DATA_RECORD = "DataEngineRecordActuator";
|
||||||
public static final String DATA_SET = "DataEngineSetActuator";
|
public static final String DATA_SET = "DataEngineSetActuator";
|
||||||
public static final String ACTION_IMPORT = "import com.muyu.rule.engine.action.ActionDiscard;\n";
|
// public static final String ACTION_IMPORT = "import com.muyu.rule.engine.action.ActionDiscard;\n";
|
||||||
public static final String SCOPE_IMPORT = "import com.muyu.rule.engine.scope.DataModelEngine";
|
public static final String SCOPE_IMPORT = "import com.muyu.rule.engine.scope.DataModelEngine";
|
||||||
public static final String PACKAGE_PATH = "package rule.util;";
|
public static final String PACKAGE_PATH = "package com.muyu.rule.generate;";
|
||||||
|
|
||||||
public static String getClassName(String versionCode) {
|
public static String getClassName(String versionCode) {
|
||||||
String[] splits = versionCode.split("_");
|
String[] splits = versionCode.split("_");
|
||||||
|
@ -32,8 +33,9 @@ public class GenerateConstant {
|
||||||
String format = simpleDateFormat.format(new Date());
|
String format = simpleDateFormat.format(new Date());
|
||||||
// String level = selectType(rule.getRuleType());
|
// String level = selectType(rule.getRuleType());
|
||||||
return
|
return
|
||||||
// PACKAGE_PATH + "\n" +
|
PACKAGE_PATH + "\n" +
|
||||||
// ACTION_IMPORT + "\n" +
|
// ACTION_IMPORT + "\n" +
|
||||||
|
"import rule.data.engine.basic.abstracts.DataEngineValueActuator" +
|
||||||
// SCOPE_IMPORT + level + ";\n" +
|
// SCOPE_IMPORT + level + ";\n" +
|
||||||
// "\n" +
|
// "\n" +
|
||||||
"/**\n" +
|
"/**\n" +
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class OSSFileDownload {
|
||||||
|
|
||||||
public static Result<Object> compile(String fileName) {
|
public static Result<Object> compile(String fileName) {
|
||||||
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
||||||
String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", fileName};
|
String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", fileName+".java"};
|
||||||
//编译任务
|
//编译任务
|
||||||
int result = compiler.run(null, null, null, strings);
|
int result = compiler.run(null, null, null, strings);
|
||||||
//检查编译结果
|
//检查编译结果
|
||||||
|
|
Loading…
Reference in New Issue