@Endpoint(id="configprops") public class ConfigurationPropertiesReportEndpoint extends Object implements org.springframework.context.ApplicationContextAware
Endpoint
to expose application properties from ConfigurationProperties
annotated beans.
To protect sensitive information from being exposed, certain property values are masked
if their names end with a set of configurable values (default "password" and "secret").
Configure property names by using endpoints.configprops.keys_to_sanitize
in
your Spring Boot application configuration.
Modifier and Type | Class and Description |
---|---|
static class |
ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties
A description of an application's
ConfigurationProperties beans. |
static class |
ConfigurationPropertiesReportEndpoint.ConfigurationPropertiesBeanDescriptor
A description of a
ConfigurationProperties bean. |
static class |
ConfigurationPropertiesReportEndpoint.ContextConfigurationProperties
A description of an application context's
ConfigurationProperties beans. |
protected static class |
ConfigurationPropertiesReportEndpoint.GenericSerializerModifier
BeanSerializerModifier to return only relevant configuration properties. |
Constructor and Description |
---|
ConfigurationPropertiesReportEndpoint() |
Modifier and Type | Method and Description |
---|---|
ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties |
configurationProperties() |
protected void |
configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Configure Jackson's
ObjectMapper to be used to serialize the
ConfigurationProperties objects into a Map structure. |
void |
setApplicationContext(org.springframework.context.ApplicationContext context) |
void |
setKeysToSanitize(String... keysToSanitize) |
public ConfigurationPropertiesReportEndpoint()
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void setKeysToSanitize(String... keysToSanitize)
@ReadOperation public ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties configurationProperties()
protected void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
ObjectMapper
to be used to serialize the
ConfigurationProperties
objects into a Map
structure.mapper
- the object mapperCopyright © 2018 Pivotal Software, Inc.. All rights reserved.