title: Spring map properties stored in database table to map
body: <p>I have stored some properties in a database table so they are easily updated rather then having them in a property file. The table only has two columns (NAME, VALUE). I can retreive the <code>VALUE</code> from the database with the <code>NAME</code> using the following code </p>
  
  <pre><code>&lt;bean id="otherPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="ignoreUnresolvablePlaceholders" value="true"/&gt;
          &lt;property name="properties"&gt;
          &lt;bean class="org.apache.commons.configuration.ConfigurationConverter" factory-method="getProperties"&gt;
              &lt;constructor-arg&gt;
                  &lt;bean class="org.apache.commons.configuration.DatabaseConfiguration"&gt;
                      &lt;constructor-arg ref="pDataSource"/&gt;
                       &lt;constructor-arg value="dbo.APPLICATIONPROPERTIES"/&gt;
                       &lt;constructor-arg value="NAME"/&gt;
                     &lt;constructor-arg value="VALUE"/&gt;
                  &lt;/bean&gt;
              &lt;/constructor-arg&gt;
          &lt;/bean&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>so it can be passed to a string variable in a class like so</p>
  
  <pre><code>&lt;bean id="generateUrlHelper" class="com.fexco.wuams.util.GenerateUrlHelper"&gt;
      &lt;property name="url" value="${webPage.url}"/&gt;
    &lt;/bean&gt;
  </code></pre>
  
  <p>This sets my url variable to what is stored in the database. My question is, is there a way to return all the columns from the database table and populate a map so i can retrieve what ever VALUE i want from the map using the NAME?</p>
  
  <p>E.G.</p>
  
  <pre><code> &lt;bean id="generateWuapsUrlHelper" class="com.fexco.wuams.util.GenerateWuapsUrlHelper"&gt;
          &lt;property name="propertiesMap" value="fullApplicationPropertiesTable"/&gt;
        &lt;/bean&gt;
  </code></pre>