Class EnvironmentPropertyIndexSupplier

java.lang.Object
de.vinado.boot.secrets.EnvironmentPropertyIndexSupplier
All Implemented Interfaces:
PropertyIndexSupplier, Supplier<Map<String,String>>

public class EnvironmentPropertyIndexSupplier extends Object implements PropertyIndexSupplier

A supplier for creating a property index over all environment properties ending with the configured suffix. The property's name gets converted to the an applicable system property name and is used to set the index's key. 1. Trimming of suffix 2. Replacement of underscores with periods 3. Conversion to lowercase The value will be the the property name.

SPRING_DATASOURCE_PASSWORD_FILEspring.datasource.password

The suffix should contain at least one character. Otherwise every environment property will be present in the index which might be a security risk.

Author:
Vincent Nadoll
  • Constructor Details

    • EnvironmentPropertyIndexSupplier

      public EnvironmentPropertyIndexSupplier(org.springframework.boot.logging.DeferredLogFactory logFactory, ConfigurableEnvironment environment)
    • EnvironmentPropertyIndexSupplier

      public EnvironmentPropertyIndexSupplier(org.springframework.boot.logging.DeferredLogFactory logFactory, ConfigurableEnvironment environment, String suffix)
  • Method Details