Class FilenamePropertyIndexSupplier

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

public class FilenamePropertyIndexSupplier extends Object implements PropertyIndexSupplier

A supplier for creating a property index over filenames in a configurable directory. The property name is based on this filename. The file 'spring.datasource.username' will add the 'spring.datasource.username' property key and its URI as value of the index. Filenames in snake case will work as well (spring_datasource_username). Other characters won't be altered.

The supplier will fall back to /run/secrets, Docker's default secretes path, in case secrets.file.base-dir is not set.

Author:
Vincent Nadoll