public final class EncryptablePreferencesPlaceholderConfigurer
extends org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer
Subclass of
org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer
which can make use of a StringEncryptor or
TextEncryptor object to decrypt preferences values
if they are encrypted in the loaded resource locations.
A value is considered "encrypted" when it appears surrounded by ENC(...), like:
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDEDEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator| Constructor and Description |
|---|
EncryptablePreferencesPlaceholderConfigurer(org.jasypt.encryption.StringEncryptor stringEncryptor)
Creates an EncryptablePreferencesPlaceholderConfigurer instance
which will use the passed
StringEncryptor object to decrypt
encrypted values. |
EncryptablePreferencesPlaceholderConfigurer(org.jasypt.util.text.TextEncryptor textEncryptor)
Creates an EncryptablePreferencesPlaceholderConfigurer instance which will use the
passed
TextEncryptor object to decrypt encrypted values. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertPropertyValue(String originalValue) |
protected String |
resolvePlaceholder(String placeholder,
Properties props) |
protected String |
resolvePlaceholder(String path,
String key,
Preferences preferences) |
afterPropertiesSet, setSystemTreePath, setUserTreePathparseStringValue, processProperties, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeNamedoProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparatorconvertProperties, convertProperty, getOrder, postProcessBeanFactory, setOrderpublic EncryptablePreferencesPlaceholderConfigurer(org.jasypt.encryption.StringEncryptor stringEncryptor)
Creates an EncryptablePreferencesPlaceholderConfigurer instance
which will use the passed StringEncryptor object to decrypt
encrypted values.
stringEncryptor - the StringEncryptor to be used do decrypt values. It
can not be null.public EncryptablePreferencesPlaceholderConfigurer(org.jasypt.util.text.TextEncryptor textEncryptor)
Creates an EncryptablePreferencesPlaceholderConfigurer instance which will use the
passed TextEncryptor object to decrypt encrypted values.
textEncryptor - the TextEncryptor to be used do decrypt values. It can
not be null.protected String convertPropertyValue(String originalValue)
convertPropertyValue in class org.springframework.beans.factory.config.PropertyResourceConfigurerprotected String resolvePlaceholder(String placeholder, Properties props)
resolvePlaceholder in class org.springframework.beans.factory.config.PreferencesPlaceholderConfigurerprotected String resolvePlaceholder(String path, String key, Preferences preferences)
resolvePlaceholder in class org.springframework.beans.factory.config.PreferencesPlaceholderConfigurerCopyright © 2019 The JASYPT team. All rights reserved.