类 ConfigurationPropertiesReportEndpoint
- java.lang.Object
- org.springframework.boot.actuate.endpoint.AbstractEndpoint<Map<String,Object>>
- org.springframework.boot.actuate.endpoint.ConfigurationPropertiesReportEndpoint
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,Endpoint<Map<String,Object>>
,org.springframework.context.ApplicationContextAware
,org.springframework.context.EnvironmentAware
@ConfigurationProperties(prefix="endpoints.configprops") public class ConfigurationPropertiesReportEndpoint extends AbstractEndpoint<Map<String,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.
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static class
ConfigurationPropertiesReportEndpoint.GenericSerializerModifier
BeanSerializerModifier
to return only relevant configuration properties.
构造器概要
构造器 构造器 说明 ConfigurationPropertiesReportEndpoint()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Configure Jackson'sObjectMapper
to be used to serialize theConfigurationProperties
objects into aMap
structure.protected Map<String,Object>
extract(org.springframework.context.ApplicationContext context)
Extract beans annotatedConfigurationProperties
and serialize intoMap
.Map<String,Object>
invoke()
Called to invoke the endpoint.void
setApplicationContext(org.springframework.context.ApplicationContext context)
void
setKeysToSanitize(String... keysToSanitize)
从类继承的方法 org.springframework.boot.actuate.endpoint.AbstractEndpoint
getEnvironment, getId, isEnabled, isSensitive, setEnabled, setEnvironment, setId, setSensitive
构造器详细资料
ConfigurationPropertiesReportEndpoint
public ConfigurationPropertiesReportEndpoint()
方法详细资料
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
- 指定者:
setApplicationContext
在接口中org.springframework.context.ApplicationContextAware
- 抛出:
org.springframework.beans.BeansException
setKeysToSanitize
public void setKeysToSanitize(String... keysToSanitize)
extract
protected Map<String,Object> extract(org.springframework.context.ApplicationContext context)
Extract beans annotatedConfigurationProperties
and serialize intoMap
.- 参数:
context
- the application context- 返回:
- the beans
configureObjectMapper
protected void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Configure Jackson'sObjectMapper
to be used to serialize theConfigurationProperties
objects into aMap
structure.- 参数:
mapper
- the object mapper