Package de.vinado.boot.secrets
Class FilenamePropertyIndexSupplier
java.lang.Object
de.vinado.boot.secrets.FilenamePropertyIndexSupplier
- All Implemented Interfaces:
PropertyIndexSupplier,Supplier<Map<String,String>>
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of available filename name separators. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final FilenamePropertyIndexSupplier.Separatorstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionFilenamePropertyIndexSupplier(org.springframework.boot.logging.DeferredLogFactory logFactory, PropertyResolver propertyResolver) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.vinado.boot.secrets.PropertyIndexSupplier
substitute, substituteValue, substituteValues
-
Field Details
-
BASE_DIR_PROPERTY
- See Also:
-
SEPARATOR_PROPERTY
- See Also:
-
DEFAULT_SEPARATOR
-
-
Constructor Details
-
FilenamePropertyIndexSupplier
public FilenamePropertyIndexSupplier(org.springframework.boot.logging.DeferredLogFactory logFactory, PropertyResolver propertyResolver)
-
-
Method Details