Testing @Scheduled annotation starts more than one thread
I have a Spring Boot application and I created a method with the @Scheduled
annotation that takes a cron expression as parameter (let’s say it needs to run every 5 seconds). The scheduled method is as follows (by way of example I only put a printout on the screen)
JUNIT. testing @Scheduled annotation start more than one thread
I have a Spring Boot application and I created a method with @Scheduled annotation that takes a cron expression as parameter (let’s say it needs to run every 5 seconds). The scheduled method is as follows (by way of example I only put a printout on the screen)