错误信息:Caused by: java.lang.IllegalStateException: Encountered invalid @Scheduled method 'personnelOutList': Only no-arg methods may be annotated with @Scheduled
at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.processScheduled
问题解答:
1.使用spring的@Scheduled()注解时候报了这个错误,报错原因是@Scheduled()注解不能使用在带参数的方法中。你的定时方法有参数!!!
2.使用spring的@Scheduled()注解时候,报了这个错误,报错原因是@Scheduled()注解不能使用在带参数的方法中。