Class ConfigurationPropertiesReportEndpoint
- java.lang.Object
- org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
@Endpoint(id="configprops") public class ConfigurationPropertiesReportEndpoint extends Object implements org.springframework.context.ApplicationContextAware
Endpoint
to expose application properties fromConfigurationProperties
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.- Since:
- 2.0.0
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties
A description of an application'sConfigurationProperties
beans.static class
ConfigurationPropertiesReportEndpoint.ConfigurationPropertiesBeanDescriptor
A description of aConfigurationProperties
bean.static class
ConfigurationPropertiesReportEndpoint.ContextConfigurationProperties
A description of an application context'sConfigurationProperties
beans.protected static class
ConfigurationPropertiesReportEndpoint.GenericSerializerModifier
BeanSerializerModifier
to return only relevant configuration properties.
Constructor Summary
Constructors Constructor Description ConfigurationPropertiesReportEndpoint()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties
configurationProperties()
protected void
configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Configure Jackson'sObjectMapper
to be used to serialize theConfigurationProperties
objects into aMap
structure.void
setApplicationContext(org.springframework.context.ApplicationContext context)
void
setKeysToSanitize(String... keysToSanitize)
Constructor Detail
ConfigurationPropertiesReportEndpoint
public ConfigurationPropertiesReportEndpoint()
Method Detail
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
setKeysToSanitize
public void setKeysToSanitize(String... keysToSanitize)
configurationProperties
@ReadOperation public ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties configurationProperties()
configureObjectMapper
protected void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Configure Jackson'sObjectMapper
to be used to serialize theConfigurationProperties
objects into aMap
structure.- Parameters:
mapper
- the object mapper