Class EncryptablePropertySourcesPlaceholderConfigurer

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered, org.springframework.core.PriorityOrdered

    public class EncryptablePropertySourcesPlaceholderConfigurer
    extends org.springframework.context.support.PropertySourcesPlaceholderConfigurer
    • Field Summary

      • Fields inherited from class org.springframework.context.support.PropertySourcesPlaceholderConfigurer

        ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME
      • Fields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

        DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator
      • Fields inherited from class org.springframework.core.io.support.PropertiesLoaderSupport

        localOverride, localProperties, logger
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void processProperties​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, org.springframework.core.env.ConfigurablePropertyResolver propertyResolver)
      Visit each bean definition in the given bean factory and attempt to replace ${...} property placeholders with values from the given properties.
      • Methods inherited from class org.springframework.context.support.PropertySourcesPlaceholderConfigurer

        getAppliedPropertySources, postProcessBeanFactory, processProperties, setEnvironment, setPropertySources
      • Methods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupport

        doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparator
      • Methods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurer

        convertProperties, convertProperty, convertPropertyValue, getOrder, setOrder
      • Methods inherited from class org.springframework.core.io.support.PropertiesLoaderSupport

        loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
    • Constructor Detail

      • EncryptablePropertySourcesPlaceholderConfigurer

        @Autowired
        public EncryptablePropertySourcesPlaceholderConfigurer​(org.jasypt.encryption.StringEncryptor stringEncryptor)
        PropertySourcesPlaceholderConfigurer constructor
        Parameters:
        stringEncryptor - the encryptor
    • Method Detail

      • processProperties

        protected void processProperties​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
                                         org.springframework.core.env.ConfigurablePropertyResolver propertyResolver)
                                  throws org.springframework.beans.BeansException
        Visit each bean definition in the given bean factory and attempt to replace ${...} property placeholders with values from the given properties. If a property is encrypted, it decrypt first and then replace.
        Overrides:
        processProperties in class org.springframework.context.support.PropertySourcesPlaceholderConfigurer
        Parameters:
        beanFactory - the bean factory to process.
        propertyResolver - used to resolve the properties
        Throws:
        org.springframework.beans.BeansException - If an error occurs.