@RefreshScope stops @Scheduled task
问题 I have a monitoring app wherein I am running a fixedRate task. This is pulling in a config parameter configured with Consul. I want to pull in updated configuration, so I added @RefreshScope. But as soon as I update the config value on Consul, the fixedRate task stops running. @Service @RefreshScope public class MonitorService { @Autowired private AppConfig appConfig; @PostConstruct public void postConstRun() { System.out.println(appConfig.getMonitorConfig()); } @Scheduled(fixedRate = 1000)