|
@@ -11,7 +11,9 @@ import com.leanwo.management.model.XmlConfigPath;
|
|
|
public class XmlConfigPathService {
|
|
public class XmlConfigPathService {
|
|
|
/**
|
|
/**
|
|
|
* 从文件中加载ApplicationSetting中的
|
|
* 从文件中加载ApplicationSetting中的
|
|
|
- * portNo,token,contents等属性
|
|
|
|
|
|
|
+ * 从config/config.properteis文件中加载portNo,token属性
|
|
|
|
|
+ * 从xml配中获取node 的数据
|
|
|
|
|
+ * ,contents等属性
|
|
|
* @param setting
|
|
* @param setting
|
|
|
*/
|
|
*/
|
|
|
public void load(ApplicationSetting setting) {
|
|
public void load(ApplicationSetting setting) {
|
|
@@ -19,6 +21,7 @@ public class XmlConfigPathService {
|
|
|
if(xmlConfigPath != null) {
|
|
if(xmlConfigPath != null) {
|
|
|
xmlConfigPath.setPortNo(100);
|
|
xmlConfigPath.setPortNo(100);
|
|
|
xmlConfigPath.setToken("123456");
|
|
xmlConfigPath.setToken("123456");
|
|
|
|
|
+
|
|
|
Map<String, String> contentMap = new HashMap<String, String>();
|
|
Map<String, String> contentMap = new HashMap<String, String>();
|
|
|
contentMap.put("dataSource1", "1");
|
|
contentMap.put("dataSource1", "1");
|
|
|
contentMap.put("dataSource2", "2");
|
|
contentMap.put("dataSource2", "2");
|
|
@@ -27,7 +30,9 @@ public class XmlConfigPathService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 将ApplicationSetting的属性portNo,token,contents保存到文件
|
|
|
|
|
|
|
+ * 将ApplicationSetting的属性portNo,token保存到config/config.properteis文件中
|
|
|
|
|
+ * 从xml配中获取node 的数据
|
|
|
|
|
+ * ,contents保存到文件
|
|
|
* @param setting
|
|
* @param setting
|
|
|
*/
|
|
*/
|
|
|
public void save(ApplicationSetting setting) {
|
|
public void save(ApplicationSetting setting) {
|