question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spring.cloud.config.uri no effect

See original GitHub issue

Spring cloud config client property “spring.cloud.config.uri” has no effect, I see the source in class org.springframework.cloud.config.client.ConfigClientProperties

    public ConfigClientProperties override(
            org.springframework.core.env.Environment environment) {
        ConfigClientProperties override = new ConfigClientProperties();
        BeanUtils.copyProperties(this, override);
        override.setName(
                environment.resolvePlaceholders("${" + ConfigClientProperties.PREFIX
                        + ".name:${spring.application.name:application}}"));
        if (environment.containsProperty(ConfigClientProperties.PREFIX + ".profile")) {
            override.setProfile(
                    environment.getProperty(ConfigClientProperties.PREFIX + ".profile"));
        }
        if (environment.containsProperty(ConfigClientProperties.PREFIX + ".label")) {
            override.setLabel(
                    environment.getProperty(ConfigClientProperties.PREFIX + ".label"));
        }
        return override;
    }

I see “profile” and “label” will override the config, but uri does not, is it right?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
ryanjbaxtercommented, Sep 11, 2016

You need to set spring.cloud.config.uri in bootstrap.yml not application.yml.

From the documentation:

To modify the startup behaviour you can change the location of the config server using bootstrap.properties (like application.properties but for the bootstrap phase of an application context)

1reaction
iampratapakcommented, May 10, 2019

You need to set spring.cloud.config.uri in bootstrap.yml not application.yml.

From the documentation:

To modify the startup behaviour you can change the location of the config server using bootstrap.properties (like application.properties but for the bootstrap phase of an application context)

It solved my issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

spring cloud config client not loading configuration from config ...
To re-enable by properties set spring.cloud.bootstrap.enabled=true or spring.config.use-legacy-processing=true. These need to be set as an ...
Read more >
Spring Cloud Config
Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system. With the Config Server you have a ...
Read more >
How does Anatomy of Spring cloud config work? - NEX Softsys
There is a setting called “spring-cloud .config.failFast=true”. The default value is false. The default is that we do not want to fail. The...
Read more >
Spring Cloud Config for Shared Microservice Configuration
This tutorial shows how to use Spring Cloud config to manage configuration properties for multiple Spring Boot applications from a single ...
Read more >
Spring Cloud - Bootstrapping - Baeldung
This is the default URL and port for a config server and indicates our discovery service did not have an address when the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found