2

I am running into an issue with Spring Cloud Config. I have a remote git repo with my config files, which is cloned down locally for local testing.

My project has 4 bootstrap.yml files as shown below

bootstrap.yml

spring:
  application:
    name: ConfigurationService
  profiles:
    active: dev, local
  cloud:
    config:
      fail-fast: true
      server:
        git:
          clone-on-start: true
          search-paths: '{application}'
          username: USERNAME
          password: PASSWORD
        bootstrap: true
      enabled: true

bootstrap-dev.yml

spring:
  application:
    name: ConfigurationService
  profiles:
    active: dev, local
  cloud:
    config:
      label: develop

server:
  port: 0

bootstrap-local.yml

spring:
  cloud:
    config:
      server:
        git:
          uri: file:///${user.home}/Projects/project
          clone-on-start: false

bootstrap-remote.yml

spring:
  cloud:
    config:
      server:
        git:
          uri: https://bitbucket.org/
          clone-on-start: true

The remote repo has a master branch and a develop branch. When I checkout develop locally and start my config service it checks out the master branch.

Why is this happening and how do i stop it? I am starting the config service in the dev profile and the local profile which uses the 'develop' label as seen in bootstrap-dev.yml.

Nick H
  • 8,897
  • 9
  • 41
  • 64

0 Answers0