Class EnableEncryptablePropertiesBeanFactoryPostProcessor

java.lang.Object
com.ulisesbocchio.jasyptspringboot.configuration.EnableEncryptablePropertiesBeanFactoryPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered

public class EnableEncryptablePropertiesBeanFactoryPostProcessor extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.ApplicationContextAware, 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 Details

    • EnableEncryptablePropertiesBeanFactoryPostProcessor

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

      Constructor for EnableEncryptablePropertiesBeanFactoryPostProcessor.

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

    • 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
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException