Announcement Announcement Module
Collapse
No announcement yet.
Making Database Configurable Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    you can use a property placeholder to externalize the values:

    http://static.springsource.org/sprin...lderconfigurer

    Comment


    • #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

      Comment


      • #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

        Comment

        Working...
        X