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.
Comment From: gwself
Comment From: gwself
There are two Task objects
Comment From: quaff
@RefreshScope
is neither part of spring-framework
nor spring-boot
, you should report it to the right project.
Comment From: gwself
I may have mentioned it in the wrong place, I should have mentioned the spring-cloud-common project
Comment From: gwself