0

New to spring boot.

My question is, "at the time of running" the spring boot app, if the git url is down/not available, then I want to have fallback.

My code looks like,

spring:
  application:
    name: myconfigservername
  profiles:
    include: git,native
  cloud:
    config:
      server:
        git:                                      
          default-label: branchname
          uri: giturlgoeshere                    ------------------------------------------------   (1)
          username: username
          password: password
        native:
          search-locations: local resource folder  ------------------------------------------------ (2)

So, if (1) goes down or not available at the time of starting the app, then I want to pick the data from the (2) place.

May I know, is there any way to achieve this.

Could someone share some input here.

PS: I already looked the link, but that SO link will not answer my question. In my case, GIT may be down at the time of starting the app itself. Any idea?

NANDAKUMAR THANGAVELU
  • 611
  • 3
  • 15
  • 34
  • This question should answer yours: https://stackoverflow.com/questions/52486278/how-do-i-setup-a-local-fallback-config-for-spring-cloud-config-service-incase-re – Rob Scully Apr 12 '19 at 14:57
  • @RobScully : Hi, Thx for the reply. Updated the question. That SO link will not address my question. Since, in my case, GIT may be down at the time of starting the app itself. Any idea? Thx. – NANDAKUMAR THANGAVELU Apr 25 '19 at 17:14

0 Answers0