@Override public void contextInitialized(ServletContextEvent sce) { String model = (String) sce.getServletContext().getInitParameter(_CONFIG_MODEL_KEY); if (!StringUtil.isEmpty(model)) { // 设定运行模式 MotionModel.setModel(Model.valueOf(model.toUpperCase())); } }
@Override public void contextDestroyed(ServletContextEvent sce) { // 设定默认的运行模式 MotionModel.setModel(Model.TEST); }