Class EnvPrinter

java.lang.Object
sk.antons.sbutils.util.EnvPrinter

public class EnvPrinter extends Object
Prints spring environment. First collect all property names defined by sources which are explicitlu configured in files. Define which of them are secured (secureSourcePredicate or securePropertyPredicate) secureSourcePredicate is by default sourceName.contains("/secrets") securePropertyPredicate is by default propName.endsWith(".password") or propName.endsWith(".key")
Author:
antons
  • Constructor Details

    • EnvPrinter

      public EnvPrinter(org.springframework.core.env.Environment env)
  • Method Details

    • instamce

      public static EnvPrinter instamce(org.springframework.core.env.Environment env)
    • secureSourcePredicate

      public Predicate<String> secureSourcePredicate()
    • secureSourcePredicate

      public EnvPrinter secureSourcePredicate(Predicate<String> value)
    • securePropertyPredicate

      public Predicate<String> securePropertyPredicate()
    • securePropertyPredicate

      public EnvPrinter securePropertyPredicate(Predicate<String> value)
    • printBySources

      public String printBySources()
      Prints info source by source.
      Returns:
      info
    • print

      public String print()
      Prints info for all collected property names
      Returns:
      info