一、spring定时器的配置使用
配置web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>ivm</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-servlet.xml,/WEB-INF/applicationContext-timer.xml</param-value>
</context-param>
<!-- 会话保活时长/分钟 -->
<session-config>
<session-timeout>360</session-timeout>
</session-config>
<servlet>
<servlet-name>applicationContext</servlet-name>