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

public class Sanitizer extends Object
Strategy that should be used by endpoint implementations to sanitize potentially sensitive keys.
Since:
2.0.0
Author:
Christian Dupuis, Toshiaki Maki, Phillip Webb, Nicolas Lejeune, Stephane Nicoll, HaiTao Zhang, Chris Bono, David Good, Madhura Bhave
  • Constructor Details

    • Sanitizer

      public Sanitizer()
      Create a new Sanitizer instance.
    • Sanitizer

      public Sanitizer(Iterable<SanitizingFunction> sanitizingFunctions)
      Create a new Sanitizer instance with sanitizing functions.
      Parameters:
      sanitizingFunctions - the sanitizing functions to apply
      Since:
      2.6.0
  • Method Details

    • sanitize

      public Object sanitize(SanitizableData data, boolean showUnsanitized)
      Sanitize the value from the given SanitizableData using the available SanitizingFunctions.
      Parameters:
      data - the sanitizable data
      showUnsanitized - whether to show the unsanitized values or not
      Returns:
      the potentially updated data
      Since:
      3.0.0