public final class EncryptablePropertyPlaceholderConfigurer
extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
Subclass of
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
which can make use of a StringEncryptor
or
TextEncryptor
object to decrypt property values
if they are encrypted in the loaded resource locations.
A value is considered "encrypted" when it appears surrounded by ENC(...), like:
Encrypted and unencrypted objects can be combined in the same resources file.
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator
Constructor and Description |
---|
EncryptablePropertyPlaceholderConfigurer(org.jasypt.encryption.StringEncryptor stringEncryptor)
Creates an EncryptablePropertyPlaceholderConfigurer instance
which will use the passed
StringEncryptor object to decrypt
encrypted values. |
EncryptablePropertyPlaceholderConfigurer(org.jasypt.util.text.TextEncryptor textEncryptor)
Creates an EncryptablePropertyPlaceholderConfigurer 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 |
resolveSystemProperty(String key) |
parseStringValue, processProperties, resolvePlaceholder, resolvePlaceholder, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator
convertProperties, convertProperty, getOrder, postProcessBeanFactory, setOrder
public EncryptablePropertyPlaceholderConfigurer(org.jasypt.encryption.StringEncryptor stringEncryptor)
Creates an EncryptablePropertyPlaceholderConfigurer 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 EncryptablePropertyPlaceholderConfigurer(org.jasypt.util.text.TextEncryptor textEncryptor)
Creates an EncryptablePropertyPlaceholderConfigurer 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.Copyright © 2019 The JASYPT team. All rights reserved.