| | |
| | | |
| | | public void doFilter(ServletRequest req, ServletResponse resp, |
| | | FilterChain chain) throws IOException, ServletException { |
| | | HttpServletRequest r = (HttpServletRequest) req; |
| | | MyRequestWrapper request = new MyRequestWrapper(r); |
| | | HttpServletRequest r = (HttpServletRequest) req; |
| | | MyRequestWrapper request = new MyRequestWrapper(r); |
| | | //System.out.println("I18nFilter request:" + request+";response:"+resp+";req+"+req); |
| | | chain.doFilter(request, resp); |
| | | } |
| | |
| | | if(PropertiesUtil.props.getProperty("message.switch").toUpperCase().equals("ON")){ |
| | | timer.schedule(new AlarmMessageTask2(),1000*10,1000*10); |
| | | } |
| | | //账号自动扫描策略,调试模式,频率为5秒钟 |
| | | //账号自动扫描策略,正式环境,频率为1天 |
| | | |
| | | //timer.schedule(new AccountScanTask(),1000,ONE_DAY); |
| | | timer.schedule(new AccountScanTask(),1000,5000); |
| | | //账号登录失败锁定相关策略,频率为2秒 |
| | | timer.schedule(new AccountLockStrategyTask(servletContextEvent.getServletContext()),1000,2000); |
| | | //账号自动扫描策略,调试模式,频率为5秒钟 |
| | | //账号自动扫描策略,正式环境,频率为1天 |
| | | if(PropertiesUtil.props.getProperty("system.type").equals("1")) { |
| | | timer.schedule(new AccountScanTask(), 1000, ONE_DAY); |
| | | } |
| | | //防重放功能随机码清除,频率为2秒 |
| | | timer.schedule(new PreventTryTask(servletContextEvent.getServletContext()),1000,2000); |
| | | } |
| | |
| | | } |
| | | |
| | | public void unLock() { |
| | | String sql = "update db_user.tb_user_inf set status = 1 ,lock_time = null where status=? and date_add(lock_time,interval 20 MINUTE)<now() and uId is not null"; |
| | | String sql = "update db_user.tb_user_inf set status = 1 ,lock_time = null where status=? and date_add(lock_time,interval 20 MINUTE)<now() and uId >100"; |
| | | DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{UserConstant.ACCOUNT_STATUS_LOCK_FAIL.getValue()}); |
| | | } |
| | | |