spring-cloud-config-client is not able to read configuration files from the spring-cloud-config-server after upgrading to 2.4.0
with spring-cloud version 2020.0.0-M6
From spring-boot 2.4.0 version, bootstrapping is not enabled by default, need to add the following dependency in your build.gradle
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
or pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
Adding to the application file (.properties or .yml) the property spring.config.import , with this it is not necessary to change/add the project's dependencies
Example:
spring.config.import=optional:configserver:
For more info: https://docs.spring.io/spring-cloud-config/docs/3.0.0/reference/html/#config-data-import
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With