YangZhiJie 8 rokov pred
rodič
commit
24c4e7c8cb

+ 3 - 2
config/applicationContext.xml

@@ -12,7 +12,7 @@
 	<context:component-scan base-package="com.leanwo" />
 
 	<bean id="autoUpdateService" class="org.leanwo.management.util.AutoUpdateService">
-		<property name="updateSite" value="http://192.168.1.200/AutoUpdate"></property>
+		<property name="updateSite" value="http://192.168.1.200:8080/AutoUpdate"></property>
 	</bean>	
 	
 	
@@ -38,7 +38,8 @@
 		<property name="stopBatFile" value="stop.bat"></property>
 		<property name="autoUpdateFileNames">
 			<list>
-				<value>DingDingServer-0.0.1-SNAPSHOT</value>
+				<value>DingDingServer-0.0.1-SNAPSHOT.jar</value>
+				<value>DingDingServer-0.0.1-SNAPSHOT.jar</value>
 			</list>
 		</property>		
 		<property name="xmlConfigPath" >

+ 5 - 0
pom.xml

@@ -79,6 +79,11 @@
 			<artifactId>jackson-annotations</artifactId>
 			<version>2.9.2</version>
 		</dependency>
+		<dependency>
+			<groupId>org.dom4j</groupId>
+			<artifactId>dom4j</artifactId>
+			<version>2.0.0-RC1</version>
+		</dependency>
 	</dependencies>
 	
 	

+ 7 - 0
src/main/java/com/leanwo/management/ServerSettingJFrame.java

@@ -179,5 +179,12 @@ public class ServerSettingJFrame  extends JFrame{
 				}
 			});
         }
+
+		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+//		this.addWindowListener(new java.awt.event.WindowAdapter() {
+//			public void windowClosing(java.awt.event.WindowEvent e) {
+//				ServerSettingJFrame.this.setVisible(false);
+//			}
+//		});
 	}
 }

+ 1 - 1
src/main/java/org/leanwo/management/util/AutoUpdateService.java

@@ -38,7 +38,7 @@ public class AutoUpdateService {
 	 */
 	public boolean canUpdate(ApplicationSetting setting) {
 		
-		return false;
+		return true;
 	}
 
 	/**

+ 7 - 2
src/main/java/org/leanwo/management/util/XmlConfigPathService.java

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