Class SanitizableData
java.lang.Object
org.springframework.boot.actuate.endpoint.SanitizableData
Value object that represents the data that can be used by a
SanitizingFunction
.- Since:
- 2.6.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSanitizableData
(org.springframework.core.env.PropertySource<?> propertySource, String key, Object value) Create a newSanitizableData
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Return the key of the data.org.springframework.core.env.PropertySource<?>
Return the property source that provided the data ornull
If the data was not from aPropertySource
.getValue()
Return the value of the data.Return a newSanitizableData
instance with a different value.
-
Field Details
-
SANITIZED_VALUE
Represents a sanitized value.- See Also:
-
-
Constructor Details
-
SanitizableData
public SanitizableData(org.springframework.core.env.PropertySource<?> propertySource, String key, Object value) Create a newSanitizableData
instance.- Parameters:
propertySource
- the property source that provided the data ornull
.key
- the data keyvalue
- the data value
-
-
Method Details
-
getPropertySource
public org.springframework.core.env.PropertySource<?> getPropertySource()Return the property source that provided the data ornull
If the data was not from aPropertySource
.- Returns:
- the property source that provided the data
-
getKey
Return the key of the data.- Returns:
- the data key
-
getValue
Return the value of the data.- Returns:
- the data value
-
withValue
Return a newSanitizableData
instance with a different value.- Parameters:
value
- the new value (oftenSANITIZED_VALUE
- Returns:
- a new sanitizable data instance
-