Spring Cloud Kubernetes - Spring boot fails to start when config reload is enabled Spring Cloud Kubernetes - Spring boot fails to start when config reload is enabled kubernetes kubernetes

Spring Cloud Kubernetes - Spring boot fails to start when config reload is enabled


It starts if you set management.endpoint.restart.enabled=true

The message tells you that it can't load a RestartEndpoint bean. None was created because there's two ways it could be loaded and nether was satisfied:

  • Bean method 'restartEndpoint' in 'RestartEndpointWithIntegrationConfiguration' not loaded because @ConditionalOnClass did not find required class 'org.springframework.integration.monitor.IntegrationMBeanExporter'

Well you're not using spring integration so I guess you don't want this path - you want the other one.

  • Bean method 'restartEndpointWithoutIntegration' in 'RestartEndpointWithoutIntegrationConfiguration' not loaded because @ConditionalOnEnabledEndpoint no property management.endpoint.restart.enabled found so using endpoint default

So we need to set management.endpoint.restart.enabled=true, which is also set in the official reload example project. Without setting this the RestartEndpoint bean that we require will not be loaded.