1
  • Is the property "health.config.enabled" still valid and being processed in current Spring Cloud?

  • If yes, where in the code it is being done?

    The property is in the current official documentation and has worked well for me so far (in cloud clients).

    But as a whole string, it cannot be found anywhere in the current source code (besides the doc source).

    For me as a beginner, it was easy to find in the old version of ConfigClientAutoConfiguration.java

    Recent version of ConfigClientAutoConfiguration.java does not contain that whole property name, although I guess it's still being processed but in a more abstract way that I don't understand yet. Thus I'd appreciate even a hint in the form of "what used to be done on line "@ConditionalOnProperty(value = "health.config.enabled", matchIfMissing = true)" before is now roughly done on line XY".

Thanks.

p4z
  • 21
  • 4

1 Answers1

0

It is replaced by @ConditionalOnEnabledHealthIndicator("config") (see here).

From the javadoc for that annotation

Blockquote @Conditional that checks whether a default health indicator is enabled. Matches if the value of the management.health.<name>.enabled

So the new property is management.health.config.enabled

spencergibb
  • 24,471
  • 6
  • 69
  • 75
  • Could you please clarify, whether your reply means A or B below? A.) Config-client app should still use "health.config.enabled" in its properties to disable health indicator loading data from the config server. The app internally converts it to "management.health.config.enabled". The current cloud config documentation is valid as it is. B.) Or the use of the "health.config.enabled" to configure the same behavior in the config client app has been abandoned and replaced by "management.health.config.enabled". Then the current cloud config documentation is outdated as well. – p4z Oct 27 '22 at 14:52
  • The property I listed is the right one. The docs need to be updated – spencergibb Oct 27 '22 at 19:12