Commit 5d4a96a4 by huangfusuper

更改插件解析XML的数据流

parent 368dc758
package com.byit.scan;
import com.byit.annotations.JobHandler;
import com.byit.task.annotations.JobHandler;
import com.byit.executor.handler.interfaces.IJobHandler;
import com.byit.model.PluginConfigModel;
import com.byit.scan.base.IScanProject;
......
......@@ -11,6 +11,7 @@ import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;
......@@ -67,6 +68,7 @@ public class XmlParseUtil {
Element serverThreadElement = serverConfigurationElement.element("server-thread");
Element pluginServiceRegistryElement = serverConfigurationElement.element("pluginServiceRegistry");
Element pluginServerClassElement = serverConfigurationElement.element("pluginServerClass");
Element remainingOperationsClassElement = serverConfigurationElement.element("remainingOperationsClass");
portParse(portElement,serverConfigurationModel);
if (registryUrlElement != null) {
......@@ -98,6 +100,14 @@ public class XmlParseUtil {
}
});
}
if (remainingOperationsClassElement != null) {
serverStringParse(remainingOperationsClassElement,value ->{
if (StringUtils.isNotBlank(value)) {
serverConfigurationModel.setRemainingOperationsClass(value);
}
});
}
}
/**
......@@ -163,11 +173,10 @@ public class XmlParseUtil {
Element packageElement = elementIterator.next();
if (packageElement!=null) {
String packageElementText = packageElement.attributeValue("class");
String jobNameText = packageElement.attributeValue("jobName");
if(serviceConfigModel.getClassNames() == null){
serviceConfigModel.setClassNames(new ConcurrentHashMap<>(8));
serviceConfigModel.setClassNames(new ArrayList<>(8));
}
serviceConfigModel.getClassNames().put(jobNameText,packageElementText);
serviceConfigModel.getClassNames().add(packageElementText);
}
}
......
package com.byit.server;
import com.byit.factory.PluginServerFactory;
import com.byit.factory.RpcMainPluginServerFactory;
public class TestServerStart {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment