Search in sources :

Example 1 with BoundConfigurationProperties

use of org.springframework.boot.context.properties.BoundConfigurationProperties in project spring-boot by spring-projects.

the class ConfigurationPropertiesReportEndpoint method getCandidate.

private ConfigurationProperty getCandidate(ConfigurationPropertyName currentName) {
    BoundConfigurationProperties bound = BoundConfigurationProperties.get(this.context);
    if (bound == null) {
        return null;
    }
    ConfigurationProperty candidate = bound.get(currentName);
    if (candidate == null && currentName.isLastElementIndexed()) {
        candidate = bound.get(currentName.chop(currentName.getNumberOfElements() - 1));
    }
    return candidate;
}
Also used : ConfigurationProperty(org.springframework.boot.context.properties.source.ConfigurationProperty) BoundConfigurationProperties(org.springframework.boot.context.properties.BoundConfigurationProperties)

Aggregations

BoundConfigurationProperties (org.springframework.boot.context.properties.BoundConfigurationProperties)1 ConfigurationProperty (org.springframework.boot.context.properties.source.ConfigurationProperty)1