springboot内置的定时任务简单使用

直接上图:搞定(一定要加@EnableScheduling(开启定时任务)这个注解@Component(让spring扫描到)),下面是每五秒执行一次

 

 结果:

猜你喜欢

转载自www.cnblogs.com/share-record/p/12283399.html