Spring cloud config with Subversion backend

江枫思渺然 提交于 2019-12-11 11:35:38

问题


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

  1. Add a dependency on svnkit to your pom.xml
  2. Change the profile to subversion
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!