Inject a result of calling a method inside config.xml datasource in spring

I have a spring project and in database.properties the value is encrypted.I have a class to decrypt that value and I am calling that inside config.xml file

database.properties

database.password=AAAAAhhhhhhiiiiii 

config.xml

<environments default="development">     <environment id="development">         <transactionManager type="JDBC"/>          <dataSource type="POOLED">             <property name="driver" value="${database.driver}"/>             <property name="url" value="${database.url}"/>             <property name="username" value="${database.username}"/>             <property name="password" value="#{com.me.portal.rest.security.encryption.PasswordEncryption.decryptPropertyValue('${database.password}')}"/>             <property name="driver.oracle.net.CONNECT_TIMEOUT" value="${database.connecttimeout}"/>             <property name="poolMaximumActiveConnections" value="100"/>         </dataSource>     </environment> </environments> 

PasswordEncryption is the class that has the decrypt method.But when I send requests to some endpoints it gives status as ‘fail’.Is there something wrong in the way I call the decrypt method inside config.xml.

Asked on July 17, 2020 in XML.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.