How spring cloud config use local property override remote property

allenyu5 picture allenyu5 · May 5, 2017 · Viewed 10.2k times · Source

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.

Answer

allenyu5 picture allenyu5 · May 9, 2017

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

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