0

I am new for spring config server. I want to implement spring config server from my application where my config server fetch properties details from git repositories but in case of my git server are not able to respond, how can I read properties from my local machine?

Note: I want to read properties from my local machine only in case my git server are not able to respond.

Alien
  • 15,141
  • 6
  • 37
  • 57
Piyush Chaudhari
  • 962
  • 3
  • 19
  • 41

1 Answers1

0

You can do it with the following configurations by repository.

spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/your-repository/config-repo
          repos:
            local:
              pattern: local*
              uri: file:/home/your-directory/config-repo
  1. local repository will match all application names beginning with local in all profiles.
  2. If was not matched your application names beginning with local in all profiles then by default URI spring.cloud.config.server.git.uri value will be replaced.

Here is documentation about it config-server-multiple-repositories.

Jonathan JOhx
  • 5,784
  • 2
  • 17
  • 33