22/08/2019

[Spring] Schedule tasks

Scheduling execution of tasks in Spring is quite easy and requires just a couple annotations:

  • Annotate the application class with @EnableScheduling
  • Provide an @Component annotated class which includes the methods to be scheduled, each annotated with @Schedule 
The schedule itself can be passed as a property. 

No comments:

Post a Comment

With great power comes great responsibility