- @Scheduled(fixedRate = 10 * 1000)
- public void checkConfigFileChanges() {
- long timestamp = new File(localConfigurationFilePath).lastModified();
- if (configFileLastModification != 0 && timestamp != configFileLastModification) {
- logger.info("Restarting due to change in the file {}", localConfigurationFilePath);
- restartApplication();
- }
- configFileLastModification = timestamp;
- }
-