Class EnableEncryptablePropertiesBeanFactoryPostProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered

    public class EnableEncryptablePropertiesBeanFactoryPostProcessor
    extends Object
    implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered

    BeanFactoryPostProcessor that wraps all PropertySource defined in the Environment with EncryptablePropertySourceWrapper and defines a default EncryptablePropertyResolver for decrypting properties that can be configured through the same properties it wraps.

    It takes the lowest precedence so it does not interfere with Spring Boot's own post processors

    Version:
    $Id: $Id
    Author:
    Ulises Bocchio
    • Constructor Detail

      • EnableEncryptablePropertiesBeanFactoryPostProcessor

        public EnableEncryptablePropertiesBeanFactoryPostProcessor​(org.springframework.core.env.ConfigurableEnvironment environment,
                                                                   EncryptablePropertySourceConverter converter)

        Constructor for EnableEncryptablePropertiesBeanFactoryPostProcessor.

        Parameters:
        environment - a ConfigurableEnvironment object
        converter - a EncryptablePropertySourceConverter object
    • Method Detail

      • postProcessBeanFactory

        public void postProcessBeanFactory​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                                    throws org.springframework.beans.BeansException
        Specified by:
        postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
        Throws:
        org.springframework.beans.BeansException
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered