springspring-cloudspring-cloud-config

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.


Solution

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

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