apolloconfig / apolloconfig/apollo
@ApolloConfigChangeListener interestedKeyPrefixes When can dynamic parameterization be supported
- Lingua principale
- Java
- Stelle
- 29.8k
- Fork
- 10.2k
- Merge medio
- 4g 7h
- PR unite (30g)
- 4
Descrizione
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?
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.