spring-cloud / spring-cloud-commons

Common classes used in different Spring Cloud implementations
Apache License 2.0
707 stars 704 forks source link

@The @RefreshScope annotation marks a Task class with a @Scheduled marked scheduled task method in the Task class. After changing the configuration, the scheduled task method is executed twice each time. #1247

Closed gwself closed 1 year ago

gwself commented 1 year ago

The @RefreshScope annotation marks a Task class with a @scheduled marked scheduled task method in the Task class. After changing the configuration, the scheduled task method is executed twice each time.

The Task class is @Autowired to the TaskController. When a method of the TaskController calls a method of the Task class, the scheduled task is executed twice.

image image image

gwself commented 1 year ago

image