Spring Application Context add bean to retrieve password

205 views Asked by At

I have a Spring Context with a bean id called batchdatasource that refer to class DriverManagerDataSource and with four properties driverClassName, url, username and password.

I get the value for placeholder from an external file called database.properties. The placeholder are: jdbc.driverClassName, jdbc.url, jdbc.username and jdbc.password

The value of the password is composed of a string that contains a series of key/value parameter, for example, "APP_ID:AIM_T26;SAFE:AIM_T26_DEV". How can I insert a bean that elaborates this password composed by parameters and return the password of type String in the Spring context? I need to elaborate the password with a cyberark library. In fact in the database.properties file there isn't the password but a string to pass to cyberark library to get the password.

Thanks in advance

0

There are 0 answers