Skip to content

Small project to demonstrate the spring config issue in spring cloud 2020.0.2

Notifications You must be signed in to change notification settings

nucatus/spring-config-enabled-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring cloud config client enable issue

This project demonstrates the issue with disabling spring cloud config on a specific profile, but not only.

🙂 Expected behavior

When the spring cloud config client is disabled by setting the spring.cloud.config.enabled property to false, the config servers that are already configured are ignored.

🙁 Observed behavior

Even if the spring cloud config client is disabled, the config server endpoint gets called, and a decision to fail the application startup process is made based on the isOptional and isNotFailFast flags.

⏯ Run

Try to run this demo with no profile selected

gradle bootRun

and then with the dev profile selected, where the cloud config was explicitly disabled.

SPRING_PROFILES_ACTIVE=dev gradle bootRun

👊 How to fix

A possible fix would be to check for the spring.cloud.config.enabled property in ConfigServerConfigDataLoader.java before doing any logic, and simply return if the config client is disabled.

About

Small project to demonstrate the spring config issue in spring cloud 2020.0.2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages