| | |
| | | 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 { |
| | | /**************************************************************************/ |
| | |
| | | |
| | | 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"); |
| | | } |
| | | |
| | | /*********************************************************************************************/ |
| | |
| | | |
| | | 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) { |