spring定时器 spring的 scheduled的使用注解的方式 xml配置 <beans> 里面加 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:annotation-driven /> //和bean同等级目录 @Scheduled(cron="0 30 2 ? * MON") public void delete404Page(){ //方法体 }