综合管理平台数据库数据模拟程序
Administrator
2021-03-25 335a3b0a6a6f27d0f7097b27c6614c66f5946676
Demo_Manage_Simul/src/main/main_Demo_Manage_Simul.java
@@ -1,12 +1,18 @@
package main;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.base.Com;
import com.config.AppConfig;
import com.mode.Device_Inf;
import com.sql.MysqlConnPool;
import com.thread.Manage_Simul_SQL;
import com.thread.Manage_Simul_Server;
public class main_Demo_Manage_Simul {
   /**************************************************************************/
@@ -31,8 +37,10 @@
   
   public static Logger logger = null;
   
   public static List<Device_Inf> devices;
   static{      
      System.setProperty("log4j.configurationFile", "log4j2_speedcollect_monitor.xml");
      System.setProperty("log4j.configurationFile", "log4j2_demo_manage_simul.xml");
   }
   
    /*********************************************************************************************/
@@ -53,9 +61,11 @@
      
      checkingMySQLServerStart();            //检测数据库服务是否启动
      /*********************************************************************************/
      devices = new ArrayList<Device_Inf>();
      Manage_Simul_SQL.queryAllDevice(GB_MysqlConnPool,devices);
      
      Manage_Simul_Server server = new Manage_Simul_Server(GB_MysqlConnPool,devices);
      server.run();
      
      
      while(true) {