(本文仅供参考)
使用spring @Scheduled注解执行定时任务:


步骤:
1.xmlns 添加:
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd xmlns:task="http://www.springframework.org/schema/task"
2.注入:
3.注解写在实现类的方法上,实现类上要有组件的
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/200491.html原文链接:https://javaforall.net
