As discussed in #147 I would like to have support for not only properties but also for syncing complete files. Imagine the following use case:
I have a file available called
resources/logback.xmland also on my server a file calledresources/logback.xml. As soon as I update the file on the server my local file should get "replaced" and loaded into the classpath.
The problem is, that services depend on that file (as an initial configuration) so we need something like a Java callback to initialize the affected service again if it depends on this file. This can also be applied to all kind of files (e.g. logback files, specific configuration, yaml configs for environments etc)
Is this feature still in scope of the spring-cloud-config project? I'm really looking forward to this feature and would like to help to implement it.
I can imagine syncing files in general, but updating the classpath dynamically seems a bit over the top.
[...] but updating the classpath dynamically seems a bit over the top.
Okay, we can leave this open to the user to implement his own solution if he depends on it. 馃憤
I know I can get plain text by URL like /{name}/{profile}/{label}/{path}锛宐ut how can I use it in spring-cloud-config except send a http request by myself, and How to Know this event When it be updated
@fliaping I dont see how your question is related to this issue, please open another issue for this question.
@fliaping
We trigger txt file config refresh by calling /refresh on app which gets the ASCII file from spring cloud config server using @RestTemplate. The method which does that is triggered by @EventListener that listens on refresh and app start events also.
You might replace the manual call on /refresh by https://cloud.spring.io/spring-cloud-config/multi/multi__push_notifications_and_spring_cloud_bus.html
Most helpful comment
I can imagine syncing files in general, but updating the classpath dynamically seems a bit over the top.