package org.leanwo.management; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.leanwo.management.util.ProgramAutoStartUtil; import org.leanwo.management.util.ProgramStopUtil; import org.springframework.context.ApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext; import com.leanwo.management.ServerManagmentJFrame; /** * Hello world! * */ public class ServerManagementApp { private static Log logger = LogFactory.getLog(ServerManagmentJFrame.class); public static void main(String[] args) { //ProgramStartUtil.generateStartBat(); ProgramAutoStartUtil.generateStartBat(); ProgramStopUtil.generateStopBat(); boolean isAutoRun = false; if(args != null && args.length > 0) { if(args[0].equals("autoRun")) { isAutoRun = true; } for(String arg : args) { logger.info("输出参数:" + arg); } } if(isAutoRun) { logger.info("程序管理器将会自动运行。"); } ApplicationContext factory = new FileSystemXmlApplicationContext("config/applicationContext.xml"); ServerManagmentJFrame serverManagmentJFrame = new ServerManagmentJFrame(isAutoRun); } }