2017-11-30 24 views
0

내가 여러 자식 저장소, 뭔가 같은 일부 구성을 읽고 싶은 봄 클라우드 구성 서버에 여러 자식 저장소를 구성 할 수 있습니다 :

Caused by: java.lang.IllegalStateException: You need to configure a uri for the git repository 
: 나는 다음과 같은 예외를 참조 시작할 때

spring: 
    profiles: 
    active: base, app1, app2 
    cloud: 
    config: 
     server: 
     base: 
      uri: http://${GIT_HOST}/base/base.git 
      username: ${GIT_USERNAME} 
      password: ${GIT_PASSWORD} 
     app1: 
      uri: http://${GIT_HOST}/group1/app1.git 
      username: ${GIT_USERNAME} 
      password: ${GIT_PASSWORD} 
     app2: 
      uri: http://${GIT_HOST}/group2/app2.git 
      username: ${GIT_USERNAME} 
      password: ${GIT_PASSWORD} 

documentation은 두 개의 서로 다른 repos, git 및 svn을 사용하는 예를 보여줍니다. 같은 종류의 여러 리포지토리를 사용할 수 없습니까?

답변

0

svngitserver 이후이며 프로필이 아니라 문서 유형입니다. 따라서 base app1, app2를 사용할 수 없습니다. 하지만 귀하의 경우에는이 종류의 구성을 사용할 수 있다고 생각합니다. document link.

spring: 
    cloud: 
    config: 
     server: 
     git: 
      uri: https://git/common/config-repo.git 
      repos: 
      team-a: 
       pattern: team-a-* 
       cloneOnStart: true 
       uri: http://git/team-a/config-repo.git 
      team-b: 
       pattern: team-b-* 
       cloneOnStart: false 
       uri: http://git/team-b/config-repo.git 
      team-c: 
       pattern: team-c-* 
       uri: http://git/team-a/config-repo.git