Results 1 to 2 of 2

Thread: Populating java.util.Properties from properties file.

  1. #1
    Join Date
    Sep 2004
    Posts
    1

    Default Populating java.util.Properties from properties file.

    I am trying to populate java.util.Properties from properties file, but I do not know how. I am trying to do something like this:

    <bean id="ttt" class="com.foo.bar">
    <property name="properties">
    <props>
    <value>classpath:test.properties</value>
    </props>
    </property>
    </bean>

  2. #2

    Default

    You can do this:

    Code:
    <bean id="ttt" class="com.foo.bar">
      <property name="properties">
        <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
          <property name="location">
            <value>classpath&#58;test.properties</value>
          </property>
        </bean>
      </property>
    </bean>

Similar Threads

  1. FlowExecutionStorage in a DB
    By cacho in forum Web Flow
    Replies: 7
    Last Post: Oct 19th, 2009, 03:36 PM
  2. Daft question. Reloading properties file
    By khylo in forum Container
    Replies: 1
    Last Post: Oct 16th, 2009, 01:03 PM
  3. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  4. Replies: 0
    Last Post: May 17th, 2005, 11:34 AM
  5. Chinese characters in properties file
    By stephenro in forum Web
    Replies: 2
    Last Post: Mar 30th, 2005, 08:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •