springBoot 项目中,使用定时任务报错

问题:

Encountered invalid @Scheduled method 'test1': Only no-arg methods may be annotated with @Scheduled

解决:

出现这个错误主要是@Scheduled注解下的方法带有参数,把@Scheduled注解下的方法的参数去掉就可以了

原文地址:https://www.cnblogs.com/liyhbk/p/13530128.html