apolloconfig / apolloconfig/apollo
@ApolloConfigChangeListener interestedKeyPrefixes When can dynamic parameterization be supported
- Vorherrschende Sprache
- Java
- Sterne
- 29.8k
- Forks
- 10.2k
- Ø Merge
- 4 T. 7 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
I hope the @ ApolloConfigChangeListener interestedKeyPrefixes can support dynamic parameters。I would like to know whether it is not supported now or there is a problem with the use;
@Value("${my.prefix}")
private String myPrefix;
@Autowired
private ConfigurableApplicationContext context;
@ApolloConfigChangeListener(value = {"${apollo.bootstrap.namespaces}"}, interestedKeyPrefixes = "#{myPrefix}")
private void onChange(ConfigChangeEvent changeEvent) {
//handle change event
if (!changeEvent.changedKeys().isEmpty()) {
context.publishEvent(new RefreshEvent(this, changeEvent, "Apollo Refresh"));
}
}
If not now, when will it be?
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.