Ejemplo n.º 1
0
 /*
  * (non-Javadoc)
  *
  * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
  */
 public void contextDestroyed(ServletContextEvent event) {
   // 记录系统日志
   LogsSystem systemLog = new LogsSystem();
   systemLog.setOperator(LogsSystem.BACKGROUND);
   systemLog.setLogDate(new Date());
   systemLog.setEventType("系统被关闭");
   systemLog.setContent(
       "系统被关闭于[" + DateUtils.getToday(DateUtils.DATE_FORMAT_YYYY_MM_DD_HH_MM_SS) + "]!");
   systemLog.setPriority(LogsApplication.IMPORTANT);
   this.systemLogManager.saveOrUpdateSystemLog(systemLog);
 }
Ejemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
  */
 public void contextInitialized(ServletContextEvent servletContextEvent) {
   initGlobal(servletContextEvent);
   initRoleRightsMap();
   initOther(servletContextEvent);
   // 记录系统日志
   LogsSystem systemLog = new LogsSystem();
   systemLog.setOperator(LogsSystem.BACKGROUND);
   systemLog.setLogDate(new Date());
   systemLog.setEventType("系统已启动");
   systemLog.setContent(
       "系统已启动于[" + DateUtils.getToday(DateUtils.DATE_FORMAT_YYYY_MM_DD_HH_MM_SS) + "]!");
   systemLog.setPriority(LogsApplication.IMPORTANT);
   this.systemLogManager.saveOrUpdateSystemLog(systemLog);
 }