Open msvab opened 7 years ago
So the ConfigWatch
may not require actuator, but the RefreshEventListener
does require it.
You're right, I've missed that! The RefreshEventListener
calls RefreshEndpoint
only to call ContextRefresher.refresh()
. Would it be possible to inject ContextRefresher
directly into RefreshEventListener
instead of RefreshEndpoint
?
Of course, anything is possible, but I'd rather not introduce that coupling. The right thing to do is install the RefreshEventListener
regardless of if actuator is present.
Depends on https://github.com/spring-cloud/spring-cloud-commons/issues/171
Alright, sounds good to me. Thanks!
Hi,
I'm using consul config in a spring application that doesn't have a web server. So I didn't include spring-boot-actuator, since I didn't see the need for it. However in
ConsulConfigAutoConfiguration
theConfigWatch
is enabled only whenRefreshEndpoint
from actuator is available.If I put the following into my app, ConfigWatch works as expected without the actuator dependency.
Actuator enables scheduling automatically in
MetricExportAutoConfiguration
and so it would have to be enabled inConsulConfigAutoConfiguration
. I don't think there would be any side-effects from this change.Cheers, Michal