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

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
    Prefix indicating an encrypted value.

    Fields inherited from interface org.springframework.boot.context.properties.bind.BindHandler

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextEncryptorBindHandler(org.springframework.security.crypto.encrypt.TextEncryptor textEncryptor, KeyProperties keyProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     

    Methods inherited from class org.springframework.boot.context.properties.bind.AbstractBindHandler

    onFailure, onFinish, onStart

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.boot.context.properties.bind.BindHandler

    onCreate
  • Field Details

    • ENCRYPTED_PROPERTY_PREFIX

      protected static final String 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:
      onSuccess in interface org.springframework.boot.context.properties.bind.BindHandler
      Overrides:
      onSuccess in class org.springframework.boot.context.properties.bind.AbstractBindHandler