Adding support for syncing complete files
See original GitHub issueAs 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.xml
and 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
I can imagine syncing files in general, but updating the classpath dynamically seems a bit over the top.
@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