首先引入命名空间:
xmlns:task="http://www.springframework.org/schema/task"
引入约束地址:
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.1.xsd
<task:scheduled-tasks>
keepAliveManager为定时任务类,方法是alive ,5秒钟执行一次
<task:scheduled ref="keepAliveManager" method="alive" cron="*/5 * * * * *" />
</task:scheduled-tasks>