首页 > 编程语言 > 详细

Spring Cloud Config 使用SVN方式的相关配置

时间:2018-09-19 15:51:43      阅读:274      评论:0      收藏:0      [点我收藏+]

文件的存储方式:

技术分享图片

 

1、使用svn 当做配置中心 config server的配置方式:

     引入svn的包

<dependency>
   <groupId>org.tmatesoft.svnkit</groupId>
   <artifactId>svnkit</artifactId>
   <version>1.8.10</version>
</dependency>

   修改application.yml

   我的svn路径是  http://ip:port/svn/mogo/Coding/app-hotpoint-parent/app-global-config/config-repo

spring:
  application:
    name: app-provider-config
  cloud:
    config:
      enabled: true
      server:
        svn:
          uri: http://ip:port/svn/mogo/Coding/app-hotpoint-parent/app-global-config
          username: username
          password: password
          default-label: config-repo
  profiles:
    active: subversion

config  client 的配置 

bootstrap.yml

spring:
  application:
    name: config-client  # 这里要跟文件(config-client-dev.yml)的前面的application段相同
  cloud:
    config:
      label: config-repo
      uri: http://localhost:7805
      name: config-client
  profiles:
    active: dev

至于其余的端口什么的,放在application.yml中即可

2、使用git 当做文件存储方式

 

Spring Cloud Config 使用SVN方式的相关配置

原文:https://www.cnblogs.com/huxipeng/p/9674516.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!