-
Feb 25th, 2010, 02:54 AM
#1
Making Database Configurable
Hi,
While specifying the datasource in the config XML, we're required to write in the URL, userID & the pwd to the bean. I was just thinking of a way to make it configurable.
Can this be done? if yes, please tell me how.
Thanks,
Karan
-
Feb 25th, 2010, 11:20 AM
#2
you can use a property placeholder to externalize the values:
http://static.springsource.org/sprin...lderconfigurer
--
Chris
-
Feb 25th, 2010, 04:50 PM
#3
Thank you. It worked.
Can I use an encrypted properties file?
For example - .dat file, which would be made from a utility that takes a property file with placeholders and combines it with a password file, to place in the actual values. Result is a .Dat file in an encrypted form.
I tried using it, but the system throws an error i.e. Could not resolve placeholder 'jdbc.driverClassName' ...looks like it is not able to read the .Dat file.
Is there any other way of using an encrypted file?
Thanks,
Karan
-
Feb 26th, 2010, 09:16 AM
#4
i don't know of anything out of the box for what your looking for, but if you go the property placeholder route, you could always extend PropertyPlaceholderConfigurer for your needs
--
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules