Results 1 to 2 of 2

Thread: Complex types values in .properties file ?

  1. #1

    Default Complex types values in .properties file ?

    Hi.

    I read that applicationContext definitions can be in .properties file, and also PropertyPlaceholderConfigurer read property values from such file, but all examples that I've seen have plaing Strings as values. What about complex types ?

    For eg. how to set List property values. It seems that following doesn't work :

    mybean.somelistproperty = value1,value2,value3

    Is it possible at all ?

    -Vjeran

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    The PropertiesBeanDefinitionReader by default does not support lists or maps. Have a look at the constants defined in the class to see what pre- and suffixes you can use. It's not only limited to string values, you can also reference other beans and set a couple of properties of beans (singleton, lazy-init, etcetera).

    I suggest you have a look at the DefaultListableBeanFactoryTestSuite (package org.springframework.beans.factory), you can find more info about the syntax there.

    Alef

Similar Threads

  1. MySQL DDL
    By analogueboy in forum Security
    Replies: 5
    Last Post: Aug 17th, 2007, 03:48 PM
  2. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  3. Complex ACL problem -- solution requested
    By ozzieg in forum Security
    Replies: 3
    Last Post: Sep 12th, 2005, 01:04 PM
  4. Replies: 2
    Last Post: May 5th, 2005, 09:35 PM
  5. Converting bean types in a beans definition file
    By davidcnoel in forum Container
    Replies: 5
    Last Post: Oct 11th, 2004, 10:46 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
  •