|
@ -193,7 +193,7 @@ public class ESBCamelService {
|
|
|
// 1、============
|
|
|
File systemClassFlowPath = new File(this.getClass().getProtectionDomain().getClassLoader().getResource("").getPath());
|
|
|
// 记录到工具类中,以便其它线程需要时进行取用
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(serviceFlow + type, packageName + CoreConstant.DOT + className);
|
|
|
SystemClassMapping.getSystemClassNameMapping().put(serviceFlow + type + className, packageName + CoreConstant.DOT + className);
|
|
|
|
|
|
// 2、============开始写入class文件
|
|
|
ClassFileUtil.createClassfile(systemClassFlowPath.toURI().toURL(), packageName, className, path);
|
|
@ -268,7 +268,6 @@ public class ESBCamelService {
|
|
|
this.genRouteFile(params);
|
|
|
|
|
|
// 3、===============加载到CamelContext中
|
|
|
Map<String, String> systemClassNameMapping = SystemClassMapping.getSystemClassNameMapping();
|
|
|
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
|
|
|
Class<RouteBuilder> routeBuilderClass = (Class<RouteBuilder>) currentClassLoader.loadClass(SystemClassMapping.getSystemClassNameMapping().get(params.getRouteId() + BrokerConstant.ROUTE + params.getNewClassName()));
|
|
|
if(routeBuilderClass != null) {
|