Question

I'm configuring the xml of EncryptablePropertyPlaceholderConfigurer (JASYPT 1.8), that extends PropertyPlaceholderConfigurer from SPRING, and I need put a environment var instead of the location of my properties file as follow, but isnt working. Anyone knows something about how could I configure it?

Everthing is working fine when I put the real path of the file.

 <bean 
   class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
        <constructor-arg ref="configurationEncryptor" />   
        <property name="systemPropertiesModeName"    value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
        <property name="searchSystemEnvironment" value="true" />
        <property name="ignoreResourceNotFound" value="true" />

         <property name="locations">
            <list>
                <value>file:///${PROP}/teste.properties</value>                  
             </list>
         </property>
    </bean>
Was it helpful?

Solution

I found a simple solution!

I just needed put this code, whitout the list tag, and works fine!

<bean class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
    <constructor-arg ref="configurationEncryptor" />
    <property name="location">
        <value>file:///${PROP}/teste.properties</value>
    </property>
</bean>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top