use of org.springframework.boot.actuate.endpoint.SanitizableData in project spring-boot by spring-projects.
the class ConfigurationPropertiesReportEndpoint method sanitizeWithPropertySourceIfPresent.
private Object sanitizeWithPropertySourceIfPresent(String qualifiedKey, Object value) {
ConfigurationPropertyName currentName = getCurrentName(qualifiedKey);
ConfigurationProperty candidate = getCandidate(currentName);
PropertySource<?> propertySource = getPropertySource(candidate);
if (propertySource != null) {
SanitizableData data = new SanitizableData(propertySource, qualifiedKey, value);
return this.sanitizer.sanitize(data);
}
SanitizableData data = new SanitizableData(null, qualifiedKey, value);
return this.sanitizer.sanitize(data);
}
use of org.springframework.boot.actuate.endpoint.SanitizableData in project spring-boot by spring-projects.
the class ConfigurationPropertiesReportEndpoint method applyInput.
private Map<String, Object> applyInput(String qualifiedKey) {
ConfigurationPropertyName currentName = getCurrentName(qualifiedKey);
ConfigurationProperty candidate = getCandidate(currentName);
PropertySource<?> propertySource = getPropertySource(candidate);
if (propertySource != null) {
Object value = stringifyIfNecessary(candidate.getValue());
SanitizableData data = new SanitizableData(propertySource, currentName.toString(), value);
return getInput(candidate, this.sanitizer.sanitize(data));
}
return Collections.emptyMap();
}
Aggregations