|
@ -67,12 +67,12 @@ public class ApplicationStartListener implements ApplicationListener<ContextRefr
|
|
|
Integer flowId = systemServiceFlow.getId();
|
|
|
String code = systemServiceFlow.getCode();
|
|
|
//默认所有class均为正确
|
|
|
isCorrectClassMap.put(code, true);
|
|
|
// 这是system业务系统在本地存储class的根目录
|
|
|
File systemClassFlowPath = new File(this.getClass().getProtectionDomain().getClassLoader().getResource("").getPath() + "/" + code);
|
|
|
File systemClassFlowPath = new File(this.getClass().getProtectionDomain().getClassLoader().getResource("").getPath());
|
|
|
List<SystemServiceFlowClass> processesClassList = systemServiceFlowClassGroupMap.get("processor" + flowId);
|
|
|
List<SystemServiceFlowClass> routesClassList = systemServiceFlowClassGroupMap.get("route" + flowId);
|
|
|
// 创建processor文件
|
|
|
isCorrectClassMap.put(code, true);
|
|
|
if (!CollectionUtil.isEmpty(processesClassList)) {
|
|
|
for (SystemServiceFlowClass processesClass : processesClassList) {
|
|
|
String className = processesClass.getClassName();
|
|
@ -82,7 +82,7 @@ public class ApplicationStartListener implements ApplicationListener<ContextRefr
|
|
|
Boolean flag = ClassFileUtil.createClassfile(systemClassFlowPath.toURI().toURL(), packageName, className, classPath);
|
|
|
// 记录到工具类中,以便其它线程需要时进行取用
|
|
|
if (flag) {
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(code + BrokerConstant.PROCESSOR, code + CoreConstant.DOT + packageName + CoreConstant.DOT + className);
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(code + BrokerConstant.PROCESSOR, packageName + CoreConstant.DOT + className);
|
|
|
} else {
|
|
|
isCorrectClassMap.put(code, flag);
|
|
|
}
|
|
@ -98,7 +98,7 @@ public class ApplicationStartListener implements ApplicationListener<ContextRefr
|
|
|
Boolean flag =ClassFileUtil.createClassfile(systemClassFlowPath.toURI().toURL(), packageName, className, classPath);
|
|
|
// 记录到工具类中,以便其它线程需要时进行取用
|
|
|
if (flag) {
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(code + BrokerConstant.ROUTE, code + CoreConstant.DOT + packageName + CoreConstant.DOT + className);
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(code + BrokerConstant.ROUTE, packageName + CoreConstant.DOT + className);
|
|
|
} else {
|
|
|
isCorrectClassMap.put(code, flag);
|
|
|
}
|
|
@ -116,6 +116,8 @@ public class ApplicationStartListener implements ApplicationListener<ContextRefr
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
isCorrectClassMap.put(code, false);
|
|
|
}
|
|
|
if (isCorrectClassMap.get(code)) {
|
|
|
if (!systemClassFlowPaths.contains(systemClassFlowPath)) {
|