Class TextEncryptorBindHandler
java.lang.Object
org.springframework.boot.context.properties.bind.AbstractBindHandler
org.springframework.cloud.bootstrap.TextEncryptorBindHandler
- All Implemented Interfaces:
org.springframework.boot.context.properties.bind.BindHandler
public class TextEncryptorBindHandler
extends org.springframework.boot.context.properties.bind.AbstractBindHandler
BindHandler that uses a TextEncryptor to decrypt text if properly prefixed with
{cipher}.
- Since:
- 3.0.0
- Author:
- Marcin Grzejszczak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringPrefix indicating an encrypted value.Fields inherited from interface org.springframework.boot.context.properties.bind.BindHandler
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionTextEncryptorBindHandler(org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor, KeyProperties keyProperties) -
Method Summary
Methods inherited from class org.springframework.boot.context.properties.bind.AbstractBindHandler
onFailure, onFinish, onStartMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.context.properties.bind.BindHandler
onCreate
-
Field Details
-
ENCRYPTED_PROPERTY_PREFIX
Prefix indicating an encrypted value.- See Also:
-
-
Constructor Details
-
TextEncryptorBindHandler
public TextEncryptorBindHandler(org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor, KeyProperties keyProperties)
-
-
Method Details
-
onSuccess
public Object onSuccess(org.springframework.boot.context.properties.source.ConfigurationPropertyName name, org.springframework.boot.context.properties.bind.Bindable<?> target, org.springframework.boot.context.properties.bind.BindContext context, Object result) - Specified by:
onSuccessin interfaceorg.springframework.boot.context.properties.bind.BindHandler- Overrides:
onSuccessin classorg.springframework.boot.context.properties.bind.AbstractBindHandler
-