Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How spring cloud config use local property override remote property

I know should set following properties, but still confused about where they should be set.

spring:
    cloud:
        config:
            allowOverride: true
            failFast: true
            overrideNone: false

application.properties file on spring cloud server side or client side or remote git repository?

I set them in application.yml on server side, but don't work.

I try set in application.yml on remote git, and again not work, hope you could give me some help, thanks.

like image 589
allenyu5 Avatar asked May 05 '17 08:05

allenyu5


People also ask

How do I override spring cloud config properties?

Overriding the Values of Remote Properties If you want to allow your applications to override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting spring. cloud. config. allowOverride=true (it doesn't work to set this locally).

How does Spring cloud config work?

Spring Cloud Config is Spring's client/server approach for storing and serving distributed configurations across multiple applications and environments. This configuration store is ideally versioned under Git version control and can be modified at application runtime.


1 Answers

I set the following configurations in remote git repo. It works this time.

spring:
  cloud:
    config:
      allowOverride: true
      overrideNone: true
      overrideSystemProperties: false
like image 78
allenyu5 Avatar answered Sep 17 '22 18:09

allenyu5