public class PropertiesDecryptor extends java.lang.Object implements OrderedContextInitializer, org.springframework.context.ApplicationContextAware
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DECRYPTED_PROPERTY_SOURCE_NAME |
static java.lang.String |
DECRYPTOR_BEAN_NAME |
Constructor and Description |
---|
PropertiesDecryptor(org.springframework.security.crypto.encrypt.TextEncryptor decryptor) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
decrypt(org.springframework.core.env.PropertySources propertySources) |
int |
getOrder() |
void |
onApplicationEvent(org.springframework.boot.context.event.ApplicationPreparedEvent event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setFailOnError(boolean failOnError)
Strategy to determine how to handle exceptions during decryption.
|
void |
setOrder(int order) |
public static final java.lang.String DECRYPTED_PROPERTY_SOURCE_NAME
public static final java.lang.String DECRYPTOR_BEAN_NAME
public PropertiesDecryptor(org.springframework.security.crypto.encrypt.TextEncryptor decryptor)
decryptor
- the TextEncryptor
used to decrypt properties.
A null is ok here but properties will not be decrypted.public void setFailOnError(boolean failOnError)
failOnError
- the flag value (default true)public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public void setOrder(int order)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationPreparedEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationPreparedEvent>
public java.util.Map<java.lang.String,java.lang.Object> decrypt(org.springframework.core.env.PropertySources propertySources)