Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 134151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:33:43+00:00 2026-05-11T06:33:43+00:00

I haven’t gotten my head wrapped around Spring yet, so correct me if this

  • 0

I haven’t gotten my head wrapped around Spring yet, so correct me if this question doesn’t make sense…

I have a PropertyPlaceholderConfigurer

<bean id='rdbmPropertiesPlacholder' class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer' lazy-init='false'>     <property name='location' value='classpath:/properties/rdbm.properties' /> </bean> 

And I have a bean being injected I guess?

<bean id='PortalDb' class='org.apache.commons.dbcp.BasicDataSource'>     <property name='driverClassName' value='${hibernate.connection.driver_class}' />     <property name='url' value='${hibernate.connection.url}' />     <property name='username' value='${hibernate.connection.username}' />     <property name='password' value='${hibernate.connection.password}' />     ... 

What I want is a second placeholder pointing to a different properties file with the username/password so that I can split up the properties into two different files. Then the database connection information can be separate from the db username/password, and I can source control one and not the other.

I’ve tried basically copying the rdbmPropertiesPlaceholder with a different id and file and trying to access the properties, but it doesn’t work.

This code is from the uPortal open source web portal project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:33:43+00:00Added an answer on May 11, 2026 at 6:33 am

    Using this notation lets you specify multiple files:

     <bean id='rdbmPropertiesPlacholder' class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer' lazy-init='false'>      <property name='locations'>        <list>            <value>classpath:/properties/rdbm.properties</value>            <value>classpath:/properties/passwords.properties</value>        </list>     </property>  </bean> 

    The propertyplaceholderconfigurerer just merges all of these to look like there’s only one, so your bean definitions do not know where the properties come from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Haven't seen many Geneva related questions yet, I have posted this question in the
I haven't seen this question anywhere else, I hope someone can help. I have
Haven't found a solution to this problem yet, have tried some things... I have
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I haven't found a definite answer to this yet. Lots of apps let you
I haven't found a question on this topic so I'll ask. I've never actually
I haven't seen this datetime format before: 2010-08-19T16:09:07.08 The nearest I have found in
I haven't used the STL much before, but I started to on this huffman
I haven't used ARC yet other than to deal with it when it forces
I haven't been able to get this working and all of the sample code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.