Repository: spring-cloud/spring-cloud-config
Issue: Actuator health check missing details in 3.0.x

**Describe the bug**
Hi, using cloud config client version 3.0.0 and native profile for configuration I always get that configuration property sources could not be loaded and status is UNKNOWN when calling the actuator health check.

```
"clientConfigServer": {
  "status": "UNKNOWN",
  "details": {
    "error": "no property sources located"
  }
}
```

Comparing to spring boot 1.x I was receiving:

```
"configServer": {
  "status": "UP",
  "propertySources": [
     "file:C:\\\\Users\\user\\projects\\tagging.yml",
  ]
}
```

Here is my configuration:

```
spring:
  application:
    name: my-app
  cloud:
    config:
      discovery:
        enabled: true
        serviceId: config-server
      failFast: false
      retry:
       initialInterval: 10000
       maxInterval: 60000
       maxAttempts: 12
       multiplier: 10.1
```
I see also the log that probably should be "CompositePropertySource" but is Bootstrap one:

`2021-02-23 10:11:15.402  INFO b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, 
BootstrapPropertySource {name='bootstrapProperties-file:C:\\Users\\user\\properties.yml'}]`

Changed files:
spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java
spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java
spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/ConfigServerHealthIndicatorTests.java

diff --git a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java
index 57a36154..0f7e9227 100644
--- a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java
+++ b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java
@@ -57,6 +57,11 @@ import static org.springframework.cloud.config.client.ConfigClientProperties.TOK
 
 public class ConfigServerConfigDataLoader implements ConfigDataLoader<ConfigServerConfigDataResource>, Ordered {
 
+	/**
+	 * PropertySource name for the config client.
+	 */
+	public static final String CONFIG_CLIENT_PROPERTYSOURCE_NAME = "configClient";
+
 	protected final Log logger;
 
 	public ConfigServerConfigDataLoader(Log logger) {
@@ -123,7 +128,7 @@ public class ConfigServerConfigDataLoader implements ConfigDataLoader<ConfigServ
 					}
 					// the existence of this property source confirms a successful
 					// response from config server
-					composite.add(0, new MapPropertySource("configClient", map));
+					composite.add(0, new MapPropertySource(CONFIG_CLIENT_PROPERTYSOURCE_NAME, map));
 					try {
 						return new ConfigData(composite, Option.IGNORE_IMPORTS, Option.IGNORE_PROFILES);
 					}
@@ -159,7 +164,8 @@ public class ConfigServerConfigDataLoader implements ConfigDataLoader<ConfigServ
 			throw new IllegalStateException("Could not locate PropertySource and " + reason + ", failing"
 					+ (errorBody == null ? "" : ": " + errorBody), error);
 		}
-		logger.warn("Could not locate PropertySource (" + resource + "): " + (error != null ? error.getMessage() : errorBody));
+		logger.warn("Could not locate PropertySource (" + resource + "): "
+				+ (error != null ? error.getMessage() : errorBody));
 		return null;
 	}
 
diff --git a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java
index 2a8fde5b..4a6bc91c 100644
--- a/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java
+++ b/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerHealthIndicator.java
@@ -18,14 +18,18 @@ package org.springframework.cloud.config.client;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import org.springframework.boot.actuate.health.AbstractHealthIndicator;
 import org.springframework.boot.actuate.health.Health.Builder;
 import org.springframework.core.env.CompositePropertySource;
 import org.springframework.core.env.ConfigurableEnvironment;
-import org.springframework.core.env.MutablePropertySources;
 import org.springframework.core.env.PropertySource;
 
+import static org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.BOOTSTRAP_PROPERTY_SOURCE_NAME;
+import static org.springframework.cloud.config.client.ConfigServerConfigDataLoader.CONFIG_CLIENT_PROPERTYSOURCE_NAME;
+import static org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver.PREFIX;
+
 /**
  * @author Spencer Gibb
  * @author Marcos Barbero
@@ -38,7 +42,7 @@ public class ConfigServerHealthIndicator extends AbstractHealthIndicator {
 
 	private long lastAccess = 0;
 
-	private PropertySource<?> cached;
+	private List<PropertySource<?>> cached = new ArrayList<>();
 
 	public ConfigServerHealthIndicator(ConfigurableEnvironment environment, ConfigClientHealthProperties properties) {
 		this.environment = environment;
@@ -47,29 +51,38 @@ public class ConfigServerHealthIndicator extends AbstractHealthIndicator {
 
 	@Override
 	protected void doHealthCheck(Builder builder) {
-		PropertySource<?> propertySource = getPropertySource();
-		builder.up();
-		if (propertySource instanceof CompositePropertySource) {
+		List<PropertySource<?>> propertySources = getPropertySource();
+		if (propertySources.isEmpty()) {
+			builder.unknown();
+			builder.unknown().withDetail("error", "no property sources located");
+		}
+		else {
+			builder.up();
 			List<String> sources = new ArrayList<>();
-			for (PropertySource<?> ps : ((CompositePropertySource) propertySource).getPropertySources()) {
-				sources.add(ps.getName());
+			for (PropertySource<?> propertySource : propertySources) {
+
+				if (propertySource instanceof CompositePropertySource) {
+					for (PropertySource<?> ps : ((CompositePropertySource) propertySource).getPropertySources()) {
+						sources.add(ps.getName());
+					}
+				}
+				else if (propertySource != null) {
+					sources.add(propertySource.getName());
+				}
 			}
 			builder.withDetail("propertySources", sources);
 		}
-		else if (propertySource != null) {
-			builder.withDetail("propertySources", propertySource.toString());
-		}
-		else {
-			builder.unknown().withDetail("error", "no property sources located");
-		}
 	}
 
-	private PropertySource<?> getPropertySource() {
+	private List<PropertySource<?>> getPropertySource() {
 		long accessTime = System.currentTimeMillis();
 		if (isCacheStale(accessTime)) {
 			this.lastAccess = accessTime;
-			MutablePropertySources propertySources = this.environment.getPropertySources();
-			this.cached = propertySources.get("configClient");
+			this.cached = this.environment.getPropertySources().stream()
+					.filter(p -> p.getName().startsWith(CONFIG_CLIENT_PROPERTYSOURCE_NAME)
+							|| p.getName().startsWith(BOOTSTRAP_PROPERTY_SOURCE_NAME + "-")
+							|| p.getName().startsWith(PREFIX))
+					.collect(Collectors.toList());
 		}
 		return this.cached;
 	}
diff --git a/spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/ConfigServerHealthIndicatorTests.java b/spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/ConfigServerHealthIndicatorTests.java
index c527626f..e04959db 100644
--- a/spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/ConfigServerHealthIndicatorTests.java
+++ b/spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/ConfigServerHealthIndicatorTests.java
@@ -17,6 +17,8 @@
 package org.springframework.cloud.config.client;
 
 import java.util.Collections;
+import java.util.List;
+import java.util.Map;
 
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
@@ -62,13 +64,23 @@ public class ConfigServerHealthIndicatorTests {
 	@Test
 	public void testServerUp() {
 		setupPropertySources();
+		Map<String, Object> details = this.indicator.getHealth(true).getDetails();
+		List<String> propertySources = (List) details.get("propertySources");
+		assertThat(propertySources.contains("bootstrapProperties-test")).isTrue();
+		assertThat(propertySources.contains("configserver:test")).isTrue();
+		assertThat(propertySources.contains("configClient")).isTrue();
+		assertThat(propertySources.size()).isEqualTo(3);
 		assertThat(this.indicator.health().getStatus()).isEqualTo(Status.UP);
 	}
 
 	protected void setupPropertySources() {
 		PropertySource<?> source = new MapPropertySource("configClient", Collections.emptyMap());
+		PropertySource<?> configServerSource = new MapPropertySource("configserver:test", Collections.emptyMap());
+		PropertySource<?> bootstrapSource = new MapPropertySource("bootstrapProperties-test", Collections.emptyMap());
 		MutablePropertySources sources = new MutablePropertySources();
 		sources.addFirst(source);
+		sources.addFirst(bootstrapSource);
+		sources.addFirst(configServerSource);
 		doReturn(sources).when(this.environment).getPropertySources();
 	}