Interface ConfigChangeListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Listener interface for configuration changes.
Implementations can react to configuration reloads.
@Service
public class MyService {
@Autowired
private MyConfig config;
@PostConstruct
public void init() {
config.addChangeListener(cfg -> {
// Handle config reload
refreshCache();
});
}
}
- Since:
- 6.2.0
- Author:
- wisdomme
-
Method Summary
Modifier and TypeMethodDescriptionvoidonConfigReload(AbstractConfigEntity config) Called when the configuration is reloaded.
-
Method Details
-
onConfigReload
Called when the configuration is reloaded.- Parameters:
config- the reloaded configuration object
-