apolloconfig / apolloconfig/apollo

@ApolloConfigChangeListener interestedKeyPrefixes When can dynamic parameterization be supported

Abierto
#4,866 5 comentarios 0 reacciones 1 asignado Reclamado por @huxleyliau Ver en GitHub
area/client feature request
Lenguaje dominante
Java
Estrellas
29.8k
Forks
10.2k
Merge medio
4 d 7 h
PR fusionados (30 d)
4

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.