public class EncryptedPropertyConfigurer
extends org.springframework.context.support.PropertySourcesPlaceholderConfigurer
ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, LOCAL_PROPERTIES_PROPERTY_SOURCE_NAMEDEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator| Constructor and Description |
|---|
EncryptedPropertyConfigurer()
The default constructor uses the default base 64 encoded secret key for doing the encryption.
|
EncryptedPropertyConfigurer(String encodedKey)
This constructor uses a user specified base 64 encoded secret key for doing the encryption.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertPropertyValue(String propertyValue)
This method decrypts a base 64 encoded, AES-128 encrypted, property value that is prefixed
with "{AES-128}".
|
protected void |
doProcessProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
org.springframework.util.StringValueResolver valueResolver)
This is method is needed because of https://jira.springsource.org/browse/SPR-8928
|
String |
encryptPropertyValue(String propertyValue)
This method encrypts a property value in such a way that it can be placed in a properties
file and automatically decrypted using this placeholder configurer.
|
getAppliedPropertySources, postProcessBeanFactory, processProperties, processProperties, setEnvironment, setPropertySourcessetBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparatorconvertProperties, convertProperty, getOrder, setOrderpublic EncryptedPropertyConfigurer()
public EncryptedPropertyConfigurer(String encodedKey)
encodedKey - The base 64 encoded string containing the AES-128 secret key for encryption.public String encryptPropertyValue(String propertyValue)
propertyValue - The property value to be encrypted.protected void doProcessProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
org.springframework.util.StringValueResolver valueResolver)
doProcessProperties in class org.springframework.beans.factory.config.PlaceholderConfigurerSupportbeanFactoryToProcess - The factory to be used for the processing.valueResolver - The value resolver to be used.protected String convertPropertyValue(String propertyValue)
convertPropertyValue in class org.springframework.beans.factory.config.PropertyResourceConfigurerpropertyValue - The property value to be decrypted.Copyright © 2016 Crater Dog Technologies(TM). All rights reserved.