While I was working at Virtusa, we had a requirement of externalizing the DB Configurations in a property.
The property file location was set on an Environment Variable.
We tried the conventional placeholder bean method and tried to append the properties file location with the ${ABC}/db.properties format. But it didn't work the way we wanted it to.
Then after some reading and trial and error I was able to figure out that
Does exactly what we require and we could use the properties in the file within the spring bean configuration using ${property name}.
The property file location was set on an Environment Variable.
We tried the conventional placeholder bean method and tried to append the properties file location with the ${ABC}/db.properties format. But it didn't work the way we wanted it to.
Then after some reading and trial and error I was able to figure out that
<context:property-placeholder location="file:///${XYZ}/DDA/db.properties"/>
Does exactly what we require and we could use the properties in the file within the spring bean configuration using ${
No comments:
Post a Comment