类 SanitizableData

java.lang.Object
org.springframework.boot.actuate.endpoint.SanitizableData

public final class SanitizableData extends Object
Value object that represents the data that can be used by a SanitizingFunction.
从以下版本开始:
2.6.0
作者:
Madhura Bhave, Rohan Goyal
  • 字段详细资料

    • SANITIZED_VALUE

      public static final String SANITIZED_VALUE
      Represents a sanitized value.
      另请参阅:
  • 构造器详细资料

    • SanitizableData

      public SanitizableData(PropertySource<?> propertySource, String key, Object value)
      Create a new SanitizableData instance.
      参数:
      propertySource - the property source that provided the data or null.
      key - the data key
      value - the data value
  • 方法详细资料

    • getPropertySource

      public PropertySource<?> getPropertySource()
      Return the property source that provided the data or null If the data was not from a PropertySource.
      返回:
      the property source that provided the data
    • getKey

      public String getKey()
      Return the key of the data.
      返回:
      the data key
    • getValue

      public Object getValue()
      Return the value of the data.
      返回:
      the data value
    • withSanitizedValue

      public SanitizableData withSanitizedValue()
      Return a new SanitizableData instance with sanitized value.
      返回:
      a new sanitizable data instance.
      从以下版本开始:
      3.1.0
    • withValue

      public SanitizableData withValue(Object value)
      Return a new SanitizableData instance with a different value.
      参数:
      value - the new value (often SANITIZED_VALUE
      返回:
      a new sanitizable data instance