问题
is this possible? What about Perforce? I would need to use one of these or a file based and check it in with the crontab or something.
回答1:
It is certainly possible to implement SVN or Perforce. You would need to implement EnvironmentRepository. See JGitEnvironmentRepository for an example.
See this question for working with local files: Spring Cloud Configuration Server not working with local properties file
回答2:
I have been working on getting SVN as a backend working.
There is support for this in spring config since March 2015 and the following is needed
- Add a dependency on svnkit to your pom.xml
- Change the profile to subversion
Your svn structure must be trunk/property-files
<dependency> <groupId>org.tmatesoft.svnkit</groupId> <artifactId>svnkit</artifactId> </dependency>
profiles: active: subversion
A sample file is here https://github.com/spring-cloud-samples/svn-config-server
The property files are loaded in this order
<appname>-<profile>.(properties|yml)
<appname>.(properties|yml)
application.(properties|yml)
来源:https://stackoverflow.com/questions/27238706/spring-cloud-config-with-subversion-backend