今天在写定时任务时出现了一个错误
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySQLDatabaseBackupUtils' defined in file [ ]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Encountered invalid @Scheduled method 'backup': Only no-arg methods may be annotated with @Scheduled
刚开始以为是cron表达式写错了,后来检查了一下发现没问题,然后经过排查发现是参数的问题,@Scheduled注解不能在有参数的方法上使用,搞了半天害