If Spring Cloud Config server is down, Can the client microservice read properties from local path

37 Views Asked by At

I have a spring cloud config server with below yml configuration.

spring:
  application:
    name: configserver
  profiles:
    active:
    - git
  cloud:
    config:
      server:
        git:
          uri: https://path-to-git-repository
          clone-on-start: true
          skipSslValidation: true
          default-label: main
          base-dir: C:\\Users\\abc\\configfiles
server:
  servlet:
    context-path: /config
  port: 8090    

Client Microservice yml configuration :

spring:
  application:
    name: xyz-service
  config:
    import:
    -optional:configserver:http://localhost:8090/config

If the config server is down due to some reason, and xyz-service has to be restarted, it should read the properties from C:\Users\abc\configfiles. Is this possible?

0

There are 0 best solutions below