Please have a look at https://www.baeldung.com/spring-task-scheduler . The @Scheduled
is a generic implementation, which you can extend and configure for your needs. While the scheduleWithFixedDelay is a specific implementation that you can directly use. Ideally, it is fine to use either of them, but if your functionality is not supposed to change, it is better to use the implementation (I mean scheduleWithFixedDelay
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…