Results 1 to 2 of 2

Thread: how to read in a dynamic list of properties?

  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Default how to read in a dynamic list of properties?

    Hi, I've been searching but cannot find these steps. I hope I'm missing something obvious.

    I have a properties file with the following contents:

    Code:
    machines=A,B
    I have another file like that but having a different amount like this:

    Code:
    machines=B,C,D
    My question is how do I load this variable length machines variable into a bean in my spring config?

    something like this:

    Code:
    <property name="machines" value="${machines}";
    where machines is an array or list in my java code..I can define it however I want if I can figure out how to do this.

    Basically I'd rather have spring do the parsing and stick each value into a list element instead of me having to write something that reads in the full machines string and do the parsing myself (with the comma delimiter) to put each value into an array or list. Is there an easy way to do this that I'm missing? Thank you!

  2. #2

    Default

    Not sure if this helps, but seems like you are trying to do something similar to...

    http://forum.springsource.org/showthread.php?t=105043

Posting Permissions

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