1.每5秒执行一次: @Scheduled(cron="0/5 * * * * ?") 2.每5分钟执行一次: @Scheduled(cron="0 0/5 * * * ?") 转载于:https://www.cnblogs.com/lbwniubi/articles/8085213.html