Class DefaultPropertyFilter
- java.lang.Object
-
- com.ulisesbocchio.jasyptspringboot.filter.DefaultPropertyFilter
-
- All Implemented Interfaces:
EncryptablePropertyFilter
public class DefaultPropertyFilter extends Object implements EncryptablePropertyFilter
Default Strategy for contemplating properties for decryption based on the following constructor args:includeSourceNames: To include property sources by name, provide a list of regex. If set, property sources that don't match will be excluded includePropertyNames: To include properties by name, provide a list of regex. If set, properties that don't match will be excluded
- Author:
- Ulises Bocchio
-
-
Constructor Summary
Constructors Constructor Description DefaultPropertyFilter()DefaultPropertyFilter(List<String> includeSourceNames, List<String> excludeSourceNames, List<String> includePropertyNames, List<String> excludePropertyNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldInclude(org.springframework.core.env.PropertySource<?> source, String name)Given a property source and a property name, returns true if the property should be analyzed for decryption.
-
-
-
Method Detail
-
shouldInclude
public boolean shouldInclude(org.springframework.core.env.PropertySource<?> source, String name)Description copied from interface:EncryptablePropertyFilterGiven a property source and a property name, returns true if the property should be analyzed for decryption.- Specified by:
shouldIncludein interfaceEncryptablePropertyFilter- Parameters:
source- The property source, useful to enabled/disable encryption for specific property sources.name- The actual property being requested, useful to enable/disable encryption for specific properties/patterns.- Returns:
- true if the property should be considered for decryption.
-
-